From 4824bb7711762cf52f31286947628a5cf7a28278 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 4 Nov 2019 09:28:19 +0800 Subject: [PATCH 01/72] sync master, update samples --- 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/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 +- .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/.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 +- .../dart/flutter_petstore/openapi/.openapi-generator/VERSION | 2 +- .../dart/openapi-browser-client/.openapi-generator/VERSION | 2 +- samples/client/petstore/dart/openapi/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- samples/client/petstore/elm-0.18/.openapi-generator/VERSION | 2 +- samples/client/petstore/elm/.openapi-generator/VERSION | 2 +- .../go-experimental/go-petstore/.openapi-generator/VERSION | 2 +- .../petstore/go/go-petstore-withXml/.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 +- samples/client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../client/petstore/java/feign10x/.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-java6/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/jersey2/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +- .../client/petstore/java/okhttp-gson/.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 +- .../client/petstore/java/retrofit/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play24/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play25/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2rx/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.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 +- .../petstore/javascript-promise/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript-promise/src/ApiClient.js | 2 +- .../petstore/javascript-promise/src/api/AnotherFakeApi.js | 2 +- samples/client/petstore/javascript-promise/src/api/FakeApi.js | 2 +- .../javascript-promise/src/api/FakeClassnameTags123Api.js | 2 +- samples/client/petstore/javascript-promise/src/api/PetApi.js | 2 +- samples/client/petstore/javascript-promise/src/api/StoreApi.js | 2 +- samples/client/petstore/javascript-promise/src/api/UserApi.js | 2 +- samples/client/petstore/javascript-promise/src/index.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesAnyType.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesArray.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesBoolean.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesClass.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesInteger.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesNumber.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesObject.js | 2 +- .../javascript-promise/src/model/AdditionalPropertiesString.js | 2 +- samples/client/petstore/javascript-promise/src/model/Animal.js | 2 +- .../client/petstore/javascript-promise/src/model/ApiResponse.js | 2 +- .../javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../petstore/javascript-promise/src/model/ArrayOfNumberOnly.js | 2 +- .../client/petstore/javascript-promise/src/model/ArrayTest.js | 2 +- .../petstore/javascript-promise/src/model/Capitalization.js | 2 +- samples/client/petstore/javascript-promise/src/model/Cat.js | 2 +- .../client/petstore/javascript-promise/src/model/CatAllOf.js | 2 +- .../client/petstore/javascript-promise/src/model/Category.js | 2 +- .../client/petstore/javascript-promise/src/model/ClassModel.js | 2 +- samples/client/petstore/javascript-promise/src/model/Client.js | 2 +- samples/client/petstore/javascript-promise/src/model/Dog.js | 2 +- .../client/petstore/javascript-promise/src/model/DogAllOf.js | 2 +- .../client/petstore/javascript-promise/src/model/EnumArrays.js | 2 +- .../client/petstore/javascript-promise/src/model/EnumClass.js | 2 +- .../client/petstore/javascript-promise/src/model/EnumTest.js | 2 +- samples/client/petstore/javascript-promise/src/model/File.js | 2 +- .../javascript-promise/src/model/FileSchemaTestClass.js | 2 +- .../client/petstore/javascript-promise/src/model/FormatTest.js | 2 +- .../petstore/javascript-promise/src/model/HasOnlyReadOnly.js | 2 +- samples/client/petstore/javascript-promise/src/model/List.js | 2 +- samples/client/petstore/javascript-promise/src/model/MapTest.js | 2 +- .../src/model/MixedPropertiesAndAdditionalPropertiesClass.js | 2 +- .../petstore/javascript-promise/src/model/Model200Response.js | 2 +- .../client/petstore/javascript-promise/src/model/ModelReturn.js | 2 +- samples/client/petstore/javascript-promise/src/model/Name.js | 2 +- .../client/petstore/javascript-promise/src/model/NumberOnly.js | 2 +- samples/client/petstore/javascript-promise/src/model/Order.js | 2 +- .../petstore/javascript-promise/src/model/OuterComposite.js | 2 +- .../client/petstore/javascript-promise/src/model/OuterEnum.js | 2 +- samples/client/petstore/javascript-promise/src/model/Pet.js | 2 +- .../petstore/javascript-promise/src/model/ReadOnlyFirst.js | 2 +- .../petstore/javascript-promise/src/model/SpecialModelName.js | 2 +- samples/client/petstore/javascript-promise/src/model/Tag.js | 2 +- .../petstore/javascript-promise/src/model/TypeHolderDefault.js | 2 +- .../petstore/javascript-promise/src/model/TypeHolderExample.js | 2 +- samples/client/petstore/javascript-promise/src/model/User.js | 2 +- samples/client/petstore/javascript-promise/src/model/XmlItem.js | 2 +- samples/client/petstore/javascript/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript/src/ApiClient.js | 2 +- samples/client/petstore/javascript/src/api/AnotherFakeApi.js | 2 +- samples/client/petstore/javascript/src/api/FakeApi.js | 2 +- .../petstore/javascript/src/api/FakeClassnameTags123Api.js | 2 +- samples/client/petstore/javascript/src/api/PetApi.js | 2 +- samples/client/petstore/javascript/src/api/StoreApi.js | 2 +- samples/client/petstore/javascript/src/api/UserApi.js | 2 +- samples/client/petstore/javascript/src/index.js | 2 +- .../javascript/src/model/AdditionalPropertiesAnyType.js | 2 +- .../petstore/javascript/src/model/AdditionalPropertiesArray.js | 2 +- .../javascript/src/model/AdditionalPropertiesBoolean.js | 2 +- .../petstore/javascript/src/model/AdditionalPropertiesClass.js | 2 +- .../javascript/src/model/AdditionalPropertiesInteger.js | 2 +- .../petstore/javascript/src/model/AdditionalPropertiesNumber.js | 2 +- .../petstore/javascript/src/model/AdditionalPropertiesObject.js | 2 +- .../petstore/javascript/src/model/AdditionalPropertiesString.js | 2 +- samples/client/petstore/javascript/src/model/Animal.js | 2 +- samples/client/petstore/javascript/src/model/ApiResponse.js | 2 +- .../petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../client/petstore/javascript/src/model/ArrayOfNumberOnly.js | 2 +- samples/client/petstore/javascript/src/model/ArrayTest.js | 2 +- samples/client/petstore/javascript/src/model/Capitalization.js | 2 +- samples/client/petstore/javascript/src/model/Cat.js | 2 +- samples/client/petstore/javascript/src/model/CatAllOf.js | 2 +- samples/client/petstore/javascript/src/model/Category.js | 2 +- samples/client/petstore/javascript/src/model/ClassModel.js | 2 +- samples/client/petstore/javascript/src/model/Client.js | 2 +- samples/client/petstore/javascript/src/model/Dog.js | 2 +- samples/client/petstore/javascript/src/model/DogAllOf.js | 2 +- samples/client/petstore/javascript/src/model/EnumArrays.js | 2 +- samples/client/petstore/javascript/src/model/EnumClass.js | 2 +- samples/client/petstore/javascript/src/model/EnumTest.js | 2 +- samples/client/petstore/javascript/src/model/File.js | 2 +- .../client/petstore/javascript/src/model/FileSchemaTestClass.js | 2 +- samples/client/petstore/javascript/src/model/FormatTest.js | 2 +- samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js | 2 +- samples/client/petstore/javascript/src/model/List.js | 2 +- samples/client/petstore/javascript/src/model/MapTest.js | 2 +- .../src/model/MixedPropertiesAndAdditionalPropertiesClass.js | 2 +- .../client/petstore/javascript/src/model/Model200Response.js | 2 +- samples/client/petstore/javascript/src/model/ModelReturn.js | 2 +- samples/client/petstore/javascript/src/model/Name.js | 2 +- samples/client/petstore/javascript/src/model/NumberOnly.js | 2 +- samples/client/petstore/javascript/src/model/Order.js | 2 +- samples/client/petstore/javascript/src/model/OuterComposite.js | 2 +- samples/client/petstore/javascript/src/model/OuterEnum.js | 2 +- samples/client/petstore/javascript/src/model/Pet.js | 2 +- samples/client/petstore/javascript/src/model/ReadOnlyFirst.js | 2 +- .../client/petstore/javascript/src/model/SpecialModelName.js | 2 +- samples/client/petstore/javascript/src/model/Tag.js | 2 +- .../client/petstore/javascript/src/model/TypeHolderDefault.js | 2 +- .../client/petstore/javascript/src/model/TypeHolderExample.js | 2 +- samples/client/petstore/javascript/src/model/User.js | 2 +- samples/client/petstore/javascript/src/model/XmlItem.js | 2 +- .../petstore/kotlin-multiplatform/.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/nim/.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 +- .../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/AdditionalPropertiesAnyType.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesString.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 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.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/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 +- 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 +- .../php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php | 2 +- .../php/OpenAPIClient-php/lib/Model/TypeHolderExample.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php | 2 +- .../OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php | 2 +- .../test/Model/AdditionalPropertiesAnyTypeTest.php | 2 +- .../test/Model/AdditionalPropertiesArrayTest.php | 2 +- .../test/Model/AdditionalPropertiesBooleanTest.php | 2 +- .../test/Model/AdditionalPropertiesClassTest.php | 2 +- .../test/Model/AdditionalPropertiesIntegerTest.php | 2 +- .../test/Model/AdditionalPropertiesNumberTest.php | 2 +- .../test/Model/AdditionalPropertiesObjectTest.php | 2 +- .../test/Model/AdditionalPropertiesStringTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 2 +- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/CapitalizationTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/ClientTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php | 2 +- .../OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/FileTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php | 2 +- .../Model/MixedPropertiesAndAdditionalPropertiesClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/Model200ResponseTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/OrderTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OuterCompositeTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php | 2 +- .../client/petstore/python-asyncio/.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 +- .../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_any_type.rb | 2 +- .../lib/petstore/models/additional_properties_array.rb | 2 +- .../lib/petstore/models/additional_properties_boolean.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../lib/petstore/models/additional_properties_integer.rb | 2 +- .../lib/petstore/models/additional_properties_number.rb | 2 +- .../lib/petstore/models/additional_properties_object.rb | 2 +- .../lib/petstore/models/additional_properties_string.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 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/has_only_read_only.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/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 +- 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 +- .../ruby-faraday/lib/petstore/models/type_holder_default.rb | 2 +- .../ruby-faraday/lib/petstore/models/type_holder_example.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/xml_item.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-faraday/petstore.gemspec | 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/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_any_type.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_array.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_boolean.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_integer.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_number.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_object.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_string.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/format_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/has_only_read_only.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 +- 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 +- 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 +- .../petstore/ruby/lib/petstore/models/type_holder_default.rb | 2 +- .../petstore/ruby/lib/petstore/models/type_holder_example.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/xml_item.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/fake_api_spec.rb | 2 +- .../petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/pet_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/store_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api/user_api_spec.rb | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- .../ruby/spec/models/additional_properties_any_type_spec.rb | 2 +- .../ruby/spec/models/additional_properties_array_spec.rb | 2 +- .../ruby/spec/models/additional_properties_boolean_spec.rb | 2 +- .../ruby/spec/models/additional_properties_class_spec.rb | 2 +- .../ruby/spec/models/additional_properties_integer_spec.rb | 2 +- .../ruby/spec/models/additional_properties_number_spec.rb | 2 +- .../ruby/spec/models/additional_properties_object_spec.rb | 2 +- .../ruby/spec/models/additional_properties_string_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/animal_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/api_response_spec.rb | 2 +- .../ruby/spec/models/array_of_array_of_number_only_spec.rb | 2 +- .../petstore/ruby/spec/models/array_of_number_only_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/array_test_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/capitalization_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/cat_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/category_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/class_model_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/client_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/dog_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/enum_class_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/enum_test_spec.rb | 2 +- .../petstore/ruby/spec/models/file_schema_test_class_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/file_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/format_test_spec.rb | 2 +- .../client/petstore/ruby/spec/models/has_only_read_only_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/list_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/map_test_spec.rb | 2 +- .../mixed_properties_and_additional_properties_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/model200_response_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/model_return_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/name_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/number_only_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/order_spec.rb | 2 +- .../client/petstore/ruby/spec/models/outer_composite_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/outer_enum_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/pet_spec.rb | 2 +- .../client/petstore/ruby/spec/models/read_only_first_spec.rb | 2 +- .../client/petstore/ruby/spec/models/special_model_name_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/tag_spec.rb | 2 +- .../petstore/ruby/spec/models/type_holder_default_spec.rb | 2 +- .../petstore/ruby/spec/models/type_holder_example_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/user_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/xml_item_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 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 +- 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 +- .../typescript-angular-v2/default/.openapi-generator/VERSION | 2 +- .../typescript-angular-v2/npm/.openapi-generator/VERSION | 2 +- .../with-interfaces/.openapi-generator/VERSION | 2 +- .../typescript-angular-v4.3/npm/.openapi-generator/VERSION | 2 +- .../typescript-angular-v4/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/with-npm/.openapi-generator/VERSION | 2 +- .../builds/with-prefixed-module-name/.openapi-generator/VERSION | 2 +- .../petstore/typescript-angularjs/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.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 +- .../typescript-fetch/builds/default/.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 +- .../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 +- .../typescript-rxjs/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.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 +- .../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 +- .../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 +- .../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 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.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 +- .../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 +- .../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 +- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php | 2 +- .../OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php | 2 +- .../test/Model/AdditionalPropertiesClassTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 2 +- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/CapitalizationTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/ClientTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php | 2 +- .../OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/FileTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/FooTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObject1Test.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObject2Test.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObject3Test.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObject4Test.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObject5Test.php | 2 +- .../php/OpenAPIClient-php/test/Model/InlineObjectTest.php | 2 +- .../OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php | 2 +- .../Model/MixedPropertiesAndAdditionalPropertiesClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/Model200ResponseTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NullableClassTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/OrderTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OuterCompositeTest.php | 2 +- .../OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php | 2 +- .../test/Model/OuterEnumIntegerDefaultValueTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 2 +- .../php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../openapi3/client/petstore/python/.openapi-generator/VERSION | 2 +- .../client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +- samples/openapi3/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 +- .../client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- .../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 +- .../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 +- .../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 +- .../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 +- .../petstore/ruby-faraday/lib/petstore/models/inline_object.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/inline_object1.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/inline_object2.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/inline_object3.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/inline_object4.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/inline_object5.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 +- .../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 +- .../client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/openapi3/client/petstore/ruby-faraday/petstore.gemspec | 2 +- .../petstore/ruby-faraday/spec/api/another_fake_api_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/api/default_api_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/api/fake_api_spec.rb | 2 +- .../ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/api/pet_api_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/api/store_api_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/api/user_api_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/api_client_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +- .../spec/models/additional_properties_class_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/animal_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/api_response_spec.rb | 2 +- .../spec/models/array_of_array_of_number_only_spec.rb | 2 +- .../ruby-faraday/spec/models/array_of_number_only_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/array_test_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/capitalization_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/cat_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/category_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/class_model_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/client_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/dog_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/enum_arrays_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/enum_class_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/enum_test_spec.rb | 2 +- .../ruby-faraday/spec/models/file_schema_test_class_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/file_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/foo_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/format_test_spec.rb | 2 +- .../ruby-faraday/spec/models/has_only_read_only_spec.rb | 2 +- .../ruby-faraday/spec/models/health_check_result_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/inline_object1_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/inline_object2_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/inline_object3_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/inline_object4_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/inline_object5_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/inline_object_spec.rb | 2 +- .../ruby-faraday/spec/models/inline_response_default_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/list_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/map_test_spec.rb | 2 +- .../mixed_properties_and_additional_properties_class_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/model200_response_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/model_return_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/name_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/nullable_class_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/number_only_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/order_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/outer_composite_spec.rb | 2 +- .../ruby-faraday/spec/models/outer_enum_default_value_spec.rb | 2 +- .../spec/models/outer_enum_integer_default_value_spec.rb | 2 +- .../ruby-faraday/spec/models/outer_enum_integer_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/pet_spec.rb | 2 +- .../petstore/ruby-faraday/spec/models/read_only_first_spec.rb | 2 +- .../ruby-faraday/spec/models/special_model_name_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/tag_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/models/user_spec.rb | 2 +- .../openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb | 2 +- .../openapi3/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/openapi3/client/petstore/ruby/lib/petstore.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- .../openapi3/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 +- .../client/petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/category.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/client.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../petstore/ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- .../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 +- .../client/petstore/ruby/lib/petstore/models/inline_object.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/inline_object1.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/inline_object2.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/inline_object3.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/inline_object4.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/inline_object5.rb | 2 +- .../ruby/lib/petstore/models/inline_response_default.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- .../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 +- .../openapi3/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- .../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 +- .../openapi3/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 +- .../openapi3/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../openapi3/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/openapi3/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/openapi3/client/petstore/ruby/petstore.gemspec | 2 +- .../client/petstore/ruby/spec/api/another_fake_api_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/api/default_api_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb | 2 +- .../petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/api/store_api_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/configuration_spec.rb | 2 +- .../ruby/spec/models/additional_properties_class_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/animal_spec.rb | 2 +- .../client/petstore/ruby/spec/models/api_response_spec.rb | 2 +- .../ruby/spec/models/array_of_array_of_number_only_spec.rb | 2 +- .../petstore/ruby/spec/models/array_of_number_only_spec.rb | 2 +- .../client/petstore/ruby/spec/models/array_test_spec.rb | 2 +- .../client/petstore/ruby/spec/models/capitalization_spec.rb | 2 +- .../client/petstore/ruby/spec/models/cat_all_of_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/category_spec.rb | 2 +- .../client/petstore/ruby/spec/models/class_model_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/client_spec.rb | 2 +- .../client/petstore/ruby/spec/models/dog_all_of_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_arrays_spec.rb | 2 +- .../client/petstore/ruby/spec/models/enum_class_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb | 2 +- .../petstore/ruby/spec/models/file_schema_test_class_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb | 2 +- .../client/petstore/ruby/spec/models/format_test_spec.rb | 2 +- .../client/petstore/ruby/spec/models/has_only_read_only_spec.rb | 2 +- .../petstore/ruby/spec/models/health_check_result_spec.rb | 2 +- .../client/petstore/ruby/spec/models/inline_object1_spec.rb | 2 +- .../client/petstore/ruby/spec/models/inline_object2_spec.rb | 2 +- .../client/petstore/ruby/spec/models/inline_object3_spec.rb | 2 +- .../client/petstore/ruby/spec/models/inline_object4_spec.rb | 2 +- .../client/petstore/ruby/spec/models/inline_object5_spec.rb | 2 +- .../client/petstore/ruby/spec/models/inline_object_spec.rb | 2 +- .../petstore/ruby/spec/models/inline_response_default_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb | 2 +- .../openapi3/client/petstore/ruby/spec/models/map_test_spec.rb | 2 +- .../mixed_properties_and_additional_properties_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/model200_response_spec.rb | 2 +- .../client/petstore/ruby/spec/models/model_return_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb | 2 +- .../client/petstore/ruby/spec/models/nullable_class_spec.rb | 2 +- .../client/petstore/ruby/spec/models/number_only_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb | 2 +- .../client/petstore/ruby/spec/models/outer_composite_spec.rb | 2 +- .../petstore/ruby/spec/models/outer_enum_default_value_spec.rb | 2 +- .../ruby/spec/models/outer_enum_integer_default_value_spec.rb | 2 +- .../client/petstore/ruby/spec/models/outer_enum_integer_spec.rb | 2 +- .../client/petstore/ruby/spec/models/outer_enum_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb | 2 +- .../client/petstore/ruby/spec/models/read_only_first_spec.rb | 2 +- .../client/petstore/ruby/spec/models/special_model_name_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb | 2 +- samples/openapi3/client/petstore/ruby/spec/spec_helper.rb | 2 +- samples/schema/petstore/mysql/.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 +- .../.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-reactive/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim4/.openapi-generator/VERSION | 2 +- .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-ze-ph/.openapi-generator/VERSION | 2 +- .../rust-server/output/multipart-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 +- 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 +- .../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 +- .../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 +- 996 files changed, 996 insertions(+), 996 deletions(-) diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index 847a905a0051..2cbb6764ab22 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index b863f066a110..39e45fbac941 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 2a3ed69edae8..fecc63a8bb51 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=4.2.1-SNAPSHOT +openApiGeneratorVersion=4.3.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 5f15f1c2ce1b..8e439bc66e9a 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 346d53c18b10..f69552e1e569 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 139ec6509299..d97ff14c9efe 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 1dc292180699..57139f09f61b 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT ../.. diff --git a/pom.xml b/pom.xml index 804877bfc976..fb9cd4658ba4 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom openapi-generator-project - 4.2.1-SNAPSHOT + 4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elm-0.18/.openapi-generator/VERSION b/samples/client/petstore/elm-0.18/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/elm-0.18/.openapi-generator/VERSION +++ b/samples/client/petstore/elm-0.18/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign10x/.openapi-generator/VERSION b/samples/client/petstore/java/feign10x/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/feign10x/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign10x/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index d0ccd4afc127..634c1cc2cce9 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js index 465d4523bce9..c0bccd8a153b 100644 --- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index 7dbe6dbe9ebc..36f3cfa74ec2 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js index a876805add08..4b9742ed90ba 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js index 6f3f14409677..71961397e2cd 100644 --- a/samples/client/petstore/javascript-promise/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index d82a310dd83d..6e8e6c70586a 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index f2aa2c917796..c82e727d1661 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index b79326a5c6db..c28e7c0f4e05 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js index aacb487b52f9..14adc61970c0 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesAnyType.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js index 7520cc064526..40312ed4bc92 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesArray.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js index fb2579b1de46..4afae3d4dbbd 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesBoolean.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index c4e981688a7d..c1e6a5a81647 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js index 44726fb129b3..345ff7fe94e2 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesInteger.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js index 0ab87773dc2b..a747d1a4f67d 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesNumber.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js index 3a9a1b945480..6f57c3ccb438 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesObject.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js index 6699e3baa2ca..57bb2c11e740 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesString.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js index 749f354bebe6..9f07c9a94f8d 100644 --- a/samples/client/petstore/javascript-promise/src/model/Animal.js +++ b/samples/client/petstore/javascript-promise/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js index 03159a492b5a..9d72c5b1c1cb 100644 --- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js index c3113eac0bea..e9bee5d9daec 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js index 6fed6e97b977..b6c6ab117124 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js index e3e435f9ffe6..4f9e7d8965a4 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js index 026b4da73fdd..8005f9ec4fac 100644 --- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js index f42e9f5dc0f6..bc8a491edb45 100644 --- a/samples/client/petstore/javascript-promise/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/CatAllOf.js b/samples/client/petstore/javascript-promise/src/model/CatAllOf.js index 4d1251fd7493..c09b9742d564 100644 --- a/samples/client/petstore/javascript-promise/src/model/CatAllOf.js +++ b/samples/client/petstore/javascript-promise/src/model/CatAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js index 1db4ec677571..830e54a3a944 100644 --- a/samples/client/petstore/javascript-promise/src/model/Category.js +++ b/samples/client/petstore/javascript-promise/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js index 81bc59383f87..aa6b4c728bce 100644 --- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js index 40d296fc37f0..ea099524a1d1 100644 --- a/samples/client/petstore/javascript-promise/src/model/Client.js +++ b/samples/client/petstore/javascript-promise/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js index f0431e006f3c..407437868d21 100644 --- a/samples/client/petstore/javascript-promise/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/DogAllOf.js b/samples/client/petstore/javascript-promise/src/model/DogAllOf.js index c6190e9582df..8034c410a06f 100644 --- a/samples/client/petstore/javascript-promise/src/model/DogAllOf.js +++ b/samples/client/petstore/javascript-promise/src/model/DogAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js index a129def63ecd..665b7f39e618 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js index 5a7e0572ca52..ea5eb4de7449 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js index effa0d78219d..a8cc30f9d421 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/File.js b/samples/client/petstore/javascript-promise/src/model/File.js index 02fcb837cca7..958c47e0e887 100644 --- a/samples/client/petstore/javascript-promise/src/model/File.js +++ b/samples/client/petstore/javascript-promise/src/model/File.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js index 4b381dde0b38..1cba715acd59 100644 --- a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js index abfac22b624f..8d43ea4cbf08 100644 --- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js index 2af005992d05..8499886b3696 100644 --- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js index c0a5596372a4..242eec767fd4 100644 --- a/samples/client/petstore/javascript-promise/src/model/List.js +++ b/samples/client/petstore/javascript-promise/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js index c27793555e2e..fa3f2167ebcb 100644 --- a/samples/client/petstore/javascript-promise/src/model/MapTest.js +++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 128997cf890f..125aff8adf58 100644 --- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index 2ea93b1572e3..ed0af2f7c992 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index fdb034cffa82..016c05932c75 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index eee4f45a2e78..78e8e151f61c 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js index 4e364148d490..0efeb5e6b10f 100644 --- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js index 501becb9b422..2a33282b3f51 100644 --- a/samples/client/petstore/javascript-promise/src/model/Order.js +++ b/samples/client/petstore/javascript-promise/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js index 1718a3a71585..7afca13dd0d4 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js index da8f90f81032..b22eafa64c71 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js index ca7393496dda..fdfaa3d8cc96 100644 --- a/samples/client/petstore/javascript-promise/src/model/Pet.js +++ b/samples/client/petstore/javascript-promise/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js index 93f3572155ee..6bb293649593 100644 --- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js index 9b0973359795..ec489b54e6d8 100644 --- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js index 43304f6575ae..e62ed3a75856 100644 --- a/samples/client/petstore/javascript-promise/src/model/Tag.js +++ b/samples/client/petstore/javascript-promise/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js b/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js index adeb2f8657dd..af6bba844fc3 100644 --- a/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js +++ b/samples/client/petstore/javascript-promise/src/model/TypeHolderDefault.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js b/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js index c9b65d7779d5..62c4f297fddf 100644 --- a/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js +++ b/samples/client/petstore/javascript-promise/src/model/TypeHolderExample.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js index e39ee072fd12..56769794a241 100644 --- a/samples/client/petstore/javascript-promise/src/model/User.js +++ b/samples/client/petstore/javascript-promise/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/XmlItem.js b/samples/client/petstore/javascript-promise/src/model/XmlItem.js index abf302540e92..5c1e082b0d48 100644 --- a/samples/client/petstore/javascript-promise/src/model/XmlItem.js +++ b/samples/client/petstore/javascript-promise/src/model/XmlItem.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index 28ab36e8caa2..b86103b6baf6 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js index 366bd855f443..65f23aaecddc 100644 --- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index 315e06c967ea..65a3d3e93eb7 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js index a9446a4d05c4..69f6e33923de 100644 --- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js index d0bb3f2d1480..0e633658df29 100644 --- a/samples/client/petstore/javascript/src/api/PetApi.js +++ b/samples/client/petstore/javascript/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index 8dc02224a9f8..a4efa307c0c2 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index ce878cde734e..6d6efcce4a66 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index b79326a5c6db..c28e7c0f4e05 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js index aacb487b52f9..14adc61970c0 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesAnyType.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js index 7520cc064526..40312ed4bc92 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesArray.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js index fb2579b1de46..4afae3d4dbbd 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesBoolean.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index c4e981688a7d..c1e6a5a81647 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js index 44726fb129b3..345ff7fe94e2 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesInteger.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js index 0ab87773dc2b..a747d1a4f67d 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesNumber.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js index 3a9a1b945480..6f57c3ccb438 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesObject.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js index 6699e3baa2ca..57bb2c11e740 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesString.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js index 749f354bebe6..9f07c9a94f8d 100644 --- a/samples/client/petstore/javascript/src/model/Animal.js +++ b/samples/client/petstore/javascript/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js index 03159a492b5a..9d72c5b1c1cb 100644 --- a/samples/client/petstore/javascript/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js index c3113eac0bea..e9bee5d9daec 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js index 6fed6e97b977..b6c6ab117124 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js index e3e435f9ffe6..4f9e7d8965a4 100644 --- a/samples/client/petstore/javascript/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js index 026b4da73fdd..8005f9ec4fac 100644 --- a/samples/client/petstore/javascript/src/model/Capitalization.js +++ b/samples/client/petstore/javascript/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js index f42e9f5dc0f6..bc8a491edb45 100644 --- a/samples/client/petstore/javascript/src/model/Cat.js +++ b/samples/client/petstore/javascript/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/CatAllOf.js b/samples/client/petstore/javascript/src/model/CatAllOf.js index 4d1251fd7493..c09b9742d564 100644 --- a/samples/client/petstore/javascript/src/model/CatAllOf.js +++ b/samples/client/petstore/javascript/src/model/CatAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js index 1db4ec677571..830e54a3a944 100644 --- a/samples/client/petstore/javascript/src/model/Category.js +++ b/samples/client/petstore/javascript/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js index 81bc59383f87..aa6b4c728bce 100644 --- a/samples/client/petstore/javascript/src/model/ClassModel.js +++ b/samples/client/petstore/javascript/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js index 40d296fc37f0..ea099524a1d1 100644 --- a/samples/client/petstore/javascript/src/model/Client.js +++ b/samples/client/petstore/javascript/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js index f0431e006f3c..407437868d21 100644 --- a/samples/client/petstore/javascript/src/model/Dog.js +++ b/samples/client/petstore/javascript/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/DogAllOf.js b/samples/client/petstore/javascript/src/model/DogAllOf.js index c6190e9582df..8034c410a06f 100644 --- a/samples/client/petstore/javascript/src/model/DogAllOf.js +++ b/samples/client/petstore/javascript/src/model/DogAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js index a129def63ecd..665b7f39e618 100644 --- a/samples/client/petstore/javascript/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js index 5a7e0572ca52..ea5eb4de7449 100644 --- a/samples/client/petstore/javascript/src/model/EnumClass.js +++ b/samples/client/petstore/javascript/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index effa0d78219d..a8cc30f9d421 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/File.js b/samples/client/petstore/javascript/src/model/File.js index 02fcb837cca7..958c47e0e887 100644 --- a/samples/client/petstore/javascript/src/model/File.js +++ b/samples/client/petstore/javascript/src/model/File.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js index 4b381dde0b38..1cba715acd59 100644 --- a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js index abfac22b624f..8d43ea4cbf08 100644 --- a/samples/client/petstore/javascript/src/model/FormatTest.js +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js index 2af005992d05..8499886b3696 100644 --- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js index c0a5596372a4..242eec767fd4 100644 --- a/samples/client/petstore/javascript/src/model/List.js +++ b/samples/client/petstore/javascript/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js index c27793555e2e..fa3f2167ebcb 100644 --- a/samples/client/petstore/javascript/src/model/MapTest.js +++ b/samples/client/petstore/javascript/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 128997cf890f..125aff8adf58 100644 --- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index 2ea93b1572e3..ed0af2f7c992 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index fdb034cffa82..016c05932c75 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index eee4f45a2e78..78e8e151f61c 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js index 4e364148d490..0efeb5e6b10f 100644 --- a/samples/client/petstore/javascript/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js index 501becb9b422..2a33282b3f51 100644 --- a/samples/client/petstore/javascript/src/model/Order.js +++ b/samples/client/petstore/javascript/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index 1718a3a71585..7afca13dd0d4 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js index da8f90f81032..b22eafa64c71 100644 --- a/samples/client/petstore/javascript/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index ca7393496dda..fdfaa3d8cc96 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js index 93f3572155ee..6bb293649593 100644 --- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js index 9b0973359795..ec489b54e6d8 100644 --- a/samples/client/petstore/javascript/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js index 43304f6575ae..e62ed3a75856 100644 --- a/samples/client/petstore/javascript/src/model/Tag.js +++ b/samples/client/petstore/javascript/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/TypeHolderDefault.js b/samples/client/petstore/javascript/src/model/TypeHolderDefault.js index adeb2f8657dd..af6bba844fc3 100644 --- a/samples/client/petstore/javascript/src/model/TypeHolderDefault.js +++ b/samples/client/petstore/javascript/src/model/TypeHolderDefault.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/TypeHolderExample.js b/samples/client/petstore/javascript/src/model/TypeHolderExample.js index c9b65d7779d5..62c4f297fddf 100644 --- a/samples/client/petstore/javascript/src/model/TypeHolderExample.js +++ b/samples/client/petstore/javascript/src/model/TypeHolderExample.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js index e39ee072fd12..56769794a241 100644 --- a/samples/client/petstore/javascript/src/model/User.js +++ b/samples/client/petstore/javascript/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/XmlItem.js b/samples/client/petstore/javascript/src/model/XmlItem.js index abf302540e92..5c1e082b0d48 100644 --- a/samples/client/petstore/javascript/src/model/XmlItem.js +++ b/samples/client/petstore/javascript/src/model/XmlItem.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 cc69deb7dba6..2e4f9f1b13e5 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 a218c87f30d2..31629c2940d2 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 ead8e14548f7..6e5db6118319 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 d03e37250052..d52d05427e8b 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 e8fd0afad4b8..061bd850a1c4 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 77340b018814..a6a93ca8822d 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 c82e68378a76..d4b3c68d1d71 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 1f024577c7d6..fee753bce1b1 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 258028bd7f63..6c30b5ef3f2f 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php index 7e7f5a2b8970..cad837551c45 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesAnyType.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php index e0f6a1bd9e7b..47a005fd1033 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesArray.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php index 867e5d6a3c95..f22766a98c59 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesBoolean.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 ccd710abceb0..229d61c45cb6 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php index 8270a5c101f6..182823e61333 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesInteger.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php index 6d62da26434e..3e04932ec1f8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesNumber.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php index 3107465b2a86..0ed83b2d5a20 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesObject.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php index e5ce6d1451e0..8d50b7dee3f1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesString.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 53fe684095b5..65ba5f24ea1b 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 c713172de2ec..876f88994378 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 840b27176f72..de76e74288b8 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 e84e61e49955..1b709956f9b2 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 a57419fe1071..a8229e3c1e72 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 f90ac1eedc2c..e3f20d0d7706 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 4d7c4762fb6a..0709869f2cf3 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 1cff07378732..d953667d39c0 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 d3e1470c15a4..68bfa9b1bb07 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 c1be346c6f0c..ec9ce0818a6a 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 6c86a4181268..888ceb57fffc 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 393508194369..5e34eb7cef28 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 796edc147860..364afa503e98 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 39b875a354ec..ef57493a205b 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 e63d14c4e1da..be46b166e1f2 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 afa5f1de2006..7531b9a8d7b6 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 f58bb3569e80..b84c99a415f2 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 dfb21041d25f..a681fc52fe40 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 af88312c01cd..2053b4aaa6c7 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 d34a3c11f460..8bccf7b6aa8b 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 9ecc404bd9cb..9d23d41d1192 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 d2c955e41a82..cbfb79047007 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 9ea7cb20d93e..5bf75e89361e 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 9a5753943e31..9365725bb09a 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 e291e2ef64d1..eba0327f41e5 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 32e8eaee9a79..86320c6190d3 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 587daa515d96..8fca482ae762 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 55d7a967d818..467ec7e5ca6c 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 a9f7cb49eca9..abf5fc58f8c2 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 a58ae36c7652..eb9d2894a4ab 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 1c432107e0dc..ca5914fd7837 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 8d48e1decb4d..bc872c574201 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 66666f2dace0..6b98c934d9b7 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 c7f0d6cdad7c..9b133fb37e6b 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 3b8111589323..f32b6b1006bf 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php index b1d4ba3e17bb..94cd0b88685e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderDefault.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php index aa765fcb062e..39e1c043c320 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/TypeHolderExample.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 183c34f1ccee..861127d29656 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php index e3143ac40b67..8795ec37e7c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/XmlItem.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.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 d1a4e9e7ae13..f08953c37c33 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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 6a00157b0403..a24c2dde30ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 77e0713f5ce0..9d56f364947c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index 6f416fc76e40..32f0245b790d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 2d2d16b829fd..27573e508715 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index e49c71ab2f61..25dbb7bd8643 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index e1634ba0d48f..5e45da208342 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php index 21b0d9280159..f30026e64435 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php index 99c706bee6ca..418b7cead0b0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php index 13078ea1f136..6a35bbda13f7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index b23531b53c70..af88f1d72ac6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php index f020cd5e0530..7a6b253a7a30 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php index da8222558233..c6784687d402 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php index 8296eda1f95f..795c6d83655f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php index 7a114488764a..dd25f666812a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 3637f0bb21d5..b3714413d397 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 268d3d229a1f..56514da3d141 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 858226450b9c..048b08cc736e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index d6fe3d61718b..63ca6fe26e9d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index d14eebbedb75..4fc7866a2346 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 508f3b517842..57f23ba252b7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index 455a7efdb253..2028ab3ad11e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 649d3076dbc0..87d06421f315 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index c6dffd9f11f8..c160c602cb5b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index a95bcb44848a..eeede0b850a3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index 8d4d6b6c9af5..f3fa825af8f6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index 3c6bab60e975..64f2ea9e0aac 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 6af3cc65c9ae..3423f10cb40e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 6a2a18fb3628..94188a250dc4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 2f5577f6c4ac..7fe49192af70 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 11ad46f26177..0a6ae0b6ac7a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index c569b83657e5..74f5b87a1abd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index e2d7cb3d85c4..a8eedbc15a98 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index a61b1adbc537..ce1d3866fc9b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 23d4b4952070..24fe5ebba13b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index 1381706b75c3..b3fdcce373ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index bfceb009789f..7f4909929bd7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 463543f3ae04..32e0816e0256 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index bcfab40ec95b..bf1035dd78f2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 672eba9d9415..46171d9c06d9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 3fd912cce7e3..8e758324738a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index e88d147d753d..c510627df773 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 6744623ece59..4a9384372723 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index a338c6bf6b0d..d9635986d540 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index 9811a30696bc..6dfd00288c04 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 6712af1fbc33..e7b6f303c775 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 86927c843439..c9108b0cb05f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index aa27307f5bb7..f15c9786c213 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 085e94038d5c..afe28ca6f90c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php index 5585eb0ed9d6..6c8b90d3d3c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php index d054c97d780c..16ab32fa56e3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 4fa063d59ed7..82a19ce00af8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php index b6d3d603b5eb..00fa0f763e3d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 45e878002021..b379be4fa1cd 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 4f0c9ab4a0ab..89c8d2239fde 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 37a55bf02708..2a39451d4c02 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 e6fc0eae3072..aaec9309f0e6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 9bf9be0da206..4bf9e8f3c10a 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 99eb4ebf5f3b..bcbef3b3676a 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6cab7b10a2d9..477ba6097a0c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3e29c798e510..aa660b080485 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 93abd6f7dd34..7858bb13bdc8 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 fd9e806ca37e..b62faba652c0 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb index b7b7b216a532..0b357571994c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_any_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb index 302f3a0435b0..709aa9677bf1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_array.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb index 4de535b4d10b..88c16871f234 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_boolean.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d01c83cc62b2..c4989e915233 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb index ac1a28bcc8e6..f5ec09b98310 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb index 02f2e756bd89..e4626bda30a4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_number.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb index 6f87bf291355..57ed4f511a93 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb index f3be808fa27a..19a593e7dccc 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_string.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 fb2487e99aa1..e65d1bc0a92f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 1ec744fd6fc4..961a46ad5a35 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3d7b6966c5ab..44b0c4e3f941 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 1717f521e714..a86a56f9c8fb 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 893302c2ef8f..b8396f438490 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 94bfa2273add..0d4db6874383 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 637b67a38b66..3956b56883f2 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6dc13cbd2b85..b38e13ccaa06 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d7e6a1fd9eb9..bd0f325df6eb 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d24a651b6dfa..e28645b4d960 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 9457f2591e82..be4e1cca84fe 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3d6bfce3f827..cdf26646acc6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 61a55de7ffaa..544dadad073e 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b3b26138785e..4a4b90e3660d 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 9b2c8a399907..fb5aa9902991 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 bdd0b1008198..f1b2562753fd 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b71a8676b76e..824104607385 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 dab73dc4bcbb..9fec8d6e90c6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3de19f7800b1..046e6970b717 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 2c22b38453f3..d0455fc19872 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 a6770da4d348..bb8eb19ff57f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3974d29af515..73b90ac3ee8b 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 991773081e33..741f21a70351 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6858f297eaef..e109fbf5ac7e 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 8f5040f9f376..0ae5c500ec83 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d3c3fe021c35..1d4a303b728e 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b7490b8a77f1..a0543406f79c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 e7280550f551..f5703047911d 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 a7155714e13c..ea548122be7c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 029932deb7d3..8f52a86f79f3 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6aebd504d0a7..a9325c08822c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 36c5476c27c1..6f13c918a4b8 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 38a7ad79b181..d0630169a477 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 fe7741c5dae3..994f11913d76 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb index a2bb34e8710b..0abfde9e150d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb index cb0111bcd88b..e9786fd3f45a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/type_holder_example.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 34c305b5500b..2982c9057759 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb index eb268f50cf5a..54a98c2fdecc 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/xml_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 2aea062de9a9..893581c1e01f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 4a13929b6ecc..8dd0008e920d 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 45e878002021..b379be4fa1cd 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 4f0c9ab4a0ab..89c8d2239fde 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 37a55bf02708..2a39451d4c02 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 e6fc0eae3072..aaec9309f0e6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 9bf9be0da206..4bf9e8f3c10a 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 99eb4ebf5f3b..bcbef3b3676a 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6cab7b10a2d9..477ba6097a0c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 2a8027e2e923..d8ad17556c20 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 93abd6f7dd34..7858bb13bdc8 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 545d3173b631..df9172e7f93f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb index b7b7b216a532..0b357571994c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_any_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb index 302f3a0435b0..709aa9677bf1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_array.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb index 4de535b4d10b..88c16871f234 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_boolean.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d01c83cc62b2..c4989e915233 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb index ac1a28bcc8e6..f5ec09b98310 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb index 02f2e756bd89..e4626bda30a4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_number.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb index 6f87bf291355..57ed4f511a93 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb index f3be808fa27a..19a593e7dccc 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_string.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 fb2487e99aa1..e65d1bc0a92f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 1ec744fd6fc4..961a46ad5a35 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3d7b6966c5ab..44b0c4e3f941 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 1717f521e714..a86a56f9c8fb 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 893302c2ef8f..b8396f438490 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 94bfa2273add..0d4db6874383 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 637b67a38b66..3956b56883f2 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6dc13cbd2b85..b38e13ccaa06 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d7e6a1fd9eb9..bd0f325df6eb 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d24a651b6dfa..e28645b4d960 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 9457f2591e82..be4e1cca84fe 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3d6bfce3f827..cdf26646acc6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 61a55de7ffaa..544dadad073e 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b3b26138785e..4a4b90e3660d 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 9b2c8a399907..fb5aa9902991 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 bdd0b1008198..f1b2562753fd 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b71a8676b76e..824104607385 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 dab73dc4bcbb..9fec8d6e90c6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3de19f7800b1..046e6970b717 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 2c22b38453f3..d0455fc19872 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 a6770da4d348..bb8eb19ff57f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 3974d29af515..73b90ac3ee8b 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 991773081e33..741f21a70351 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6858f297eaef..e109fbf5ac7e 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 8f5040f9f376..0ae5c500ec83 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 d3c3fe021c35..1d4a303b728e 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b7490b8a77f1..a0543406f79c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 e7280550f551..f5703047911d 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 a7155714e13c..ea548122be7c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 029932deb7d3..8f52a86f79f3 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 6aebd504d0a7..a9325c08822c 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 36c5476c27c1..6f13c918a4b8 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 38a7ad79b181..d0630169a477 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 fe7741c5dae3..994f11913d76 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb b/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb index a2bb34e8710b..0abfde9e150d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/type_holder_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb b/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb index cb0111bcd88b..e9786fd3f45a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/type_holder_example.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 34c305b5500b..2982c9057759 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb b/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb index eb268f50cf5a..54a98c2fdecc 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/xml_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 2aea062de9a9..893581c1e01f 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index d5df4a5e3add..de4035b3b8b9 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb index 883cc2e41415..b4543ee51447 100644 --- a/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb index 526e7d95e44c..b495d44f4edf 100644 --- a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb index 4cce9145d683..ea56a91cdc3d 100644 --- a/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/pet_api_spec.rb b/samples/client/petstore/ruby/spec/api/pet_api_spec.rb index b16914b9a185..d9cffeab99ba 100644 --- a/samples/client/petstore/ruby/spec/api/pet_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/pet_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/client/petstore/ruby/spec/api/store_api_spec.rb index 1674c45686ec..3322df77682d 100644 --- a/samples/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/store_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/client/petstore/ruby/spec/api/user_api_spec.rb index cf9e2c45ee8d..1cff275207b8 100644 --- a/samples/client/petstore/ruby/spec/api/user_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/user_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.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 b1b795b5c8b9..bef4a88a2e3b 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index 9e8e7d809833..67cb5ef0fe23 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb index 1350392e17b6..4c0d4b289d8e 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb index 60ccf409bdca..562e61a52542 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb index 9678f7bdccb3..aa92df861796 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index d6df72d4b0e8..37c0bb91c42d 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb index 07b2504a8a26..d959476f825a 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb index 6dbafbe08f8e..67a7519638e3 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb index 1335e0e9015c..f6e9d0807c81 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb index bfdfa8dca295..f8e4e50164c8 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/animal_spec.rb b/samples/client/petstore/ruby/spec/models/animal_spec.rb index fbcf3c6c8de4..5a53866a883f 100644 --- a/samples/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/client/petstore/ruby/spec/models/animal_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/client/petstore/ruby/spec/models/api_response_spec.rb index bb646f76391d..dc3ededbeffc 100644 --- a/samples/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb b/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb index 5bf0f0e8a690..7709c7864c1f 100644 --- a/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb b/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb index cbd744021b84..adc9db6b3711 100644 --- a/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/client/petstore/ruby/spec/models/array_test_spec.rb index a65aff44e76d..8c617b4925c4 100644 --- a/samples/client/petstore/ruby/spec/models/array_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/capitalization_spec.rb b/samples/client/petstore/ruby/spec/models/capitalization_spec.rb index 1feac907fd96..7f4b2d20547f 100644 --- a/samples/client/petstore/ruby/spec/models/capitalization_spec.rb +++ b/samples/client/petstore/ruby/spec/models/capitalization_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb index 5b320fa5f3bd..3e9b5a7d2ba8 100644 --- a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/cat_spec.rb b/samples/client/petstore/ruby/spec/models/cat_spec.rb index 05885ebe24cc..f3971b6087c3 100644 --- a/samples/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/category_spec.rb b/samples/client/petstore/ruby/spec/models/category_spec.rb index b22981067674..7b5a69a92b9e 100644 --- a/samples/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/client/petstore/ruby/spec/models/category_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/class_model_spec.rb b/samples/client/petstore/ruby/spec/models/class_model_spec.rb index 8c18d865f3a4..9feff10a2fc9 100644 --- a/samples/client/petstore/ruby/spec/models/class_model_spec.rb +++ b/samples/client/petstore/ruby/spec/models/class_model_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/client_spec.rb b/samples/client/petstore/ruby/spec/models/client_spec.rb index 55b62d8c47a8..7ef018537ab2 100644 --- a/samples/client/petstore/ruby/spec/models/client_spec.rb +++ b/samples/client/petstore/ruby/spec/models/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb index 2d968408e496..96bb0c7151cc 100644 --- a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/dog_spec.rb b/samples/client/petstore/ruby/spec/models/dog_spec.rb index 9194b54a8a87..ea14fab18378 100644 --- a/samples/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb b/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb index 15c81256a14a..0bc936038643 100644 --- a/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb index 2f1ddaed7036..718d50f0ef75 100644 --- a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb index 6f241f8cad9f..13072b398bcc 100644 --- a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb b/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb index c0604d2e0eae..b645b814b7a0 100644 --- a/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/file_spec.rb b/samples/client/petstore/ruby/spec/models/file_spec.rb index 3d0d56e1b3ad..1455cd8fe49f 100644 --- a/samples/client/petstore/ruby/spec/models/file_spec.rb +++ b/samples/client/petstore/ruby/spec/models/file_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb index b7f47f427346..ddf3f180af75 100644 --- a/samples/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/format_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb b/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb index 17cc0a96ea95..94ceb588b589 100644 --- a/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/list_spec.rb b/samples/client/petstore/ruby/spec/models/list_spec.rb index 896ac528af03..712bc60fc975 100644 --- a/samples/client/petstore/ruby/spec/models/list_spec.rb +++ b/samples/client/petstore/ruby/spec/models/list_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/map_test_spec.rb b/samples/client/petstore/ruby/spec/models/map_test_spec.rb index 8f1dd9745afa..68af369edb6c 100644 --- a/samples/client/petstore/ruby/spec/models/map_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/map_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb index 3e79c17393e8..74682d5070f8 100644 --- a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/model200_response_spec.rb b/samples/client/petstore/ruby/spec/models/model200_response_spec.rb index 96c30d045a42..17d81cd53e11 100644 --- a/samples/client/petstore/ruby/spec/models/model200_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model200_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/client/petstore/ruby/spec/models/model_return_spec.rb index ae41ba5fb04b..9955c485a22f 100644 --- a/samples/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model_return_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/name_spec.rb b/samples/client/petstore/ruby/spec/models/name_spec.rb index 1576729614f4..8231e889df4a 100644 --- a/samples/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/number_only_spec.rb b/samples/client/petstore/ruby/spec/models/number_only_spec.rb index ed84ea33158c..5279dc3d1517 100644 --- a/samples/client/petstore/ruby/spec/models/number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/order_spec.rb b/samples/client/petstore/ruby/spec/models/order_spec.rb index fbc30effe671..dc78d58c6295 100644 --- a/samples/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/client/petstore/ruby/spec/models/order_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb b/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb index 3f5df785a307..5d5867a960ef 100644 --- a/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb +++ b/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb b/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb index a100a994126b..81489e56efb5 100644 --- a/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb +++ b/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/pet_spec.rb b/samples/client/petstore/ruby/spec/models/pet_spec.rb index 44e4f1860912..377ea72bdbaa 100644 --- a/samples/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/models/pet_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb index 2bb17df497ce..85634671a39d 100644 --- a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb +++ b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb index d93b1bcbbaea..d0ac24aa1b4a 100644 --- a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/tag_spec.rb b/samples/client/petstore/ruby/spec/models/tag_spec.rb index 15653d9340dc..01f21801e0f3 100644 --- a/samples/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/client/petstore/ruby/spec/models/tag_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb b/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb index cae3b46d6560..433a060a4508 100644 --- a/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb +++ b/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb b/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb index 698a7287b87e..8a8bc5c89500 100644 --- a/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb +++ b/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/user_spec.rb b/samples/client/petstore/ruby/spec/models/user_spec.rb index af77c56f1b07..999f4e0d087c 100644 --- a/samples/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/client/petstore/ruby/spec/models/user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/xml_item_spec.rb b/samples/client/petstore/ruby/spec/models/xml_item_spec.rb index eb577b05da38..2a35a5c3ab42 100644 --- a/samples/client/petstore/ruby/spec/models/xml_item_spec.rb +++ b/samples/client/petstore/ruby/spec/models/xml_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index 86d9d2cc924b..604b23f2d6f6 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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 cf5413d12d70..886467e844c3 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 297f7bf010e9..b9954c761860 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 e2314e99a3fc..5e45c4c596f8 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 01b48d395d30..67f77daccb37 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 407728da9ef1..59f909dd7be7 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 4f321387d389..8c3fa57e578d 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 8a3cdac2d3a1..8288bed77968 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 e12e9f1d48db..3ba89ca0d962 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 03897a65e143..4702142e60a9 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 21f4f9dff82c..cfee4d10ba5c 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 4.2.1-SNAPSHOT + 4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 87b2013337ee..0707d9c290dd 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index ef5957313eaa..a5dfae17ef83 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 0f49b6e371a8..4c92435e1bc3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 73ac6510e5fa..c1ba79b57f6c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index a0a86671b707..7d8759bca4fc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 76d6a92afcdd..84965ee9005f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index b283454efe30..c180ff9dc67f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index c82e68378a76..d4b3c68d1d71 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 6a7b50377a97..e9bdc346801e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 258028bd7f63..6c30b5ef3f2f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 9b1bf6f0f826..7bb3dfa9a221 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 53fe684095b5..65ba5f24ea1b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index c713172de2ec..876f88994378 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 840b27176f72..de76e74288b8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index e84e61e49955..1b709956f9b2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index a57419fe1071..a8229e3c1e72 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index f90ac1eedc2c..e3f20d0d7706 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 4d7c4762fb6a..0709869f2cf3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index 1cff07378732..d953667d39c0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index d3e1470c15a4..68bfa9b1bb07 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index c1be346c6f0c..ec9ce0818a6a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 6c86a4181268..888ceb57fffc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index 393508194369..5e34eb7cef28 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index 796edc147860..364afa503e98 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 39b875a354ec..ef57493a205b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index e63d14c4e1da..be46b166e1f2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 285fc8bb46ce..3a5cd0700435 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index f58bb3569e80..b84c99a415f2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index dfb21041d25f..a681fc52fe40 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index b1ccf965957e..1b2ce47be3e2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 4902556e3b20..276b393f7498 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index d34a3c11f460..8bccf7b6aa8b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index 87a7e2002488..e26e75265d97 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php index ea2c43924f5d..eb5cbcfb8a59 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php index 07a099dc6d6a..8424facb6753 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php index 7861defa6ce2..d0a35a0cdc8a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php index aeeaad17e728..3b89cfbb16c2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php index 852a4b5f8fa1..3a6115ec23fb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php index c372845cf479..17ad55a290ae 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index 265f16955f0a..1595f4ef260f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 9ecc404bd9cb..9d23d41d1192 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index d2c955e41a82..cbfb79047007 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 9ea7cb20d93e..5bf75e89361e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 9a5753943e31..9365725bb09a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index e291e2ef64d1..eba0327f41e5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 32e8eaee9a79..86320c6190d3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 587daa515d96..8fca482ae762 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index e46bfef057be..96c93d098929 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 55d7a967d818..467ec7e5ca6c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index a9f7cb49eca9..abf5fc58f8c2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index a58ae36c7652..eb9d2894a4ab 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 1c432107e0dc..ca5914fd7837 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 3fdf0be6a6f5..3fbd2420cbeb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index 6316e5c27b0a..c37c612aa38c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index 209ca66ba75c..ac43d49e0298 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 8d48e1decb4d..bc872c574201 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 66666f2dace0..6b98c934d9b7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index bbc5d8c1bf2a..c0dbc67f43e3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 3b8111589323..f32b6b1006bf 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 183c34f1ccee..861127d29656 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index d1a4e9e7ae13..f08953c37c33 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 6a00157b0403..a24c2dde30ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php index 1132a3785c2e..e42429547f68 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 04c23bddb931..5fa376e79a48 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index 6f416fc76e40..32f0245b790d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 2d2d16b829fd..27573e508715 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index e49c71ab2f61..25dbb7bd8643 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index e1634ba0d48f..5e45da208342 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 561bacbc948e..59556f799a90 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 3637f0bb21d5..b3714413d397 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 268d3d229a1f..56514da3d141 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 858226450b9c..048b08cc736e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index d6fe3d61718b..63ca6fe26e9d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index d14eebbedb75..4fc7866a2346 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 508f3b517842..57f23ba252b7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index 455a7efdb253..2028ab3ad11e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 649d3076dbc0..87d06421f315 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index c6dffd9f11f8..c160c602cb5b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index a95bcb44848a..eeede0b850a3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index 8d4d6b6c9af5..f3fa825af8f6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index 3c6bab60e975..64f2ea9e0aac 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 6af3cc65c9ae..3423f10cb40e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 6a2a18fb3628..94188a250dc4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 2f5577f6c4ac..7fe49192af70 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index a1bac4ac4700..e98672a80254 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index c569b83657e5..74f5b87a1abd 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index e2d7cb3d85c4..a8eedbc15a98 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php index 7baababe894f..02ef4226b59e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index babbc418b9a9..05a24cbf6859 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 23d4b4952070..24fe5ebba13b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php index 1c6424c20a22..9728bfc6ae83 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php index 43da41ea4ded..80928c280df9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php index d661035a48db..b3d3a273468f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php index 652f70199db4..8ac81e2639b9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php index f2ebbceab34e..9f4e4f349b36 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php index d081799163d5..e7d9353b8d62 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php index b0d412819cc2..b5c4c045bac6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php index c2400cdcf5c3..687de052d991 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index 1381706b75c3..b3fdcce373ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index bfceb009789f..7f4909929bd7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 463543f3ae04..32e0816e0256 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index bcfab40ec95b..bf1035dd78f2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 672eba9d9415..46171d9c06d9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 3fd912cce7e3..8e758324738a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php index 828e28ad6a3f..6161045f63c8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index e88d147d753d..c510627df773 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 6744623ece59..4a9384372723 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index a338c6bf6b0d..d9635986d540 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php index 01e81b09635d..b0b2df3de387 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php index d0b5e3effb22..16a371785b2a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php index 6cb6c49fd0ad..ca66871cf359 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index 9811a30696bc..6dfd00288c04 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 6712af1fbc33..e7b6f303c775 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 86927c843439..c9108b0cb05f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index aa27307f5bb7..f15c9786c213 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 085e94038d5c..afe28ca6f90c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 4fa063d59ed7..82a19ce00af8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.1-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/openapi3/client/petstore/ruby-faraday/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore.rb index bcfb2040b3c1..a97effa8a625 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index 1a1010a8761d..c09a8987705d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index bed5d58e028d..fbe3ffa51ae0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 381a65ae9ccb..9b0f9166f865 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index 3379fb9f9fe9..c58118dbea81 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index 81949bd1eb2c..6865ba986dba 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb index 5958a01aa26f..c8899904df73 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index efcb5b071af2..00cf88a4e8f3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api_client.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api_client.rb index 3e29c798e510..aa660b080485 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api_error.rb index 93abd6f7dd34..7858bb13bdc8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/configuration.rb index d034e0f8a84f..938d4b881f94 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index db0a19529b9d..fe4c8d5c2b72 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index fb2487e99aa1..e65d1bc0a92f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index 1ec744fd6fc4..961a46ad5a35 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 3d7b6966c5ab..44b0c4e3f941 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 1717f521e714..a86a56f9c8fb 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 893302c2ef8f..b8396f438490 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index 94bfa2273add..0d4db6874383 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 637b67a38b66..3956b56883f2 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index 6dc13cbd2b85..b38e13ccaa06 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/category.rb index d7e6a1fd9eb9..bd0f325df6eb 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index d24a651b6dfa..e28645b4d960 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/client.rb index 9457f2591e82..be4e1cca84fe 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 3d6bfce3f827..cdf26646acc6 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index 61a55de7ffaa..544dadad073e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index b3b26138785e..4a4b90e3660d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index 9b2c8a399907..fb5aa9902991 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index 28adcff9fb6a..625ff1a325d3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/file.rb index b71a8676b76e..824104607385 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index dab73dc4bcbb..9fec8d6e90c6 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 32b1a33570ef..cbf85e6c26e9 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 9dc3296dfb52..0810ffde584b 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index 2c22b38453f3..d0455fc19872 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index ea946134b5d5..bb090fbaf5a1 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb index 3140ed41a420..225918f14911 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb index 27557505ca70..0dd41bb252c4 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb index 73e500af56eb..b45bef1a7ea9 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb index 6ab144d8fd09..b38aa479c197 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb index 255475c06f7e..a60685d201c8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb index 2a213bb0c0cf..91b593e5a4ef 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index 8b5c138c1595..78c0118e178e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/list.rb index a6770da4d348..bb8eb19ff57f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index 3974d29af515..73b90ac3ee8b 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 991773081e33..741f21a70351 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index 6858f297eaef..e109fbf5ac7e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index 8f5040f9f376..0ae5c500ec83 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/name.rb index d3c3fe021c35..1d4a303b728e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index 959f610a9590..892065c96bae 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index b7490b8a77f1..a0543406f79c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/order.rb index e7280550f551..f5703047911d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index a7155714e13c..ea548122be7c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index 029932deb7d3..8f52a86f79f3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index d9e3da079bba..3b81ff2768c0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index ba2b947522a9..60d759918aea 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index 0e3dae64d8d4..5935a5d54e41 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 6aebd504d0a7..a9325c08822c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index 36c5476c27c1..6f13c918a4b8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index 38a7ad79b181..d0630169a477 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index fe7741c5dae3..994f11913d76 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/user.rb index 34c305b5500b..2982c9057759 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/version.rb index 2aea062de9a9..893581c1e01f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/petstore.gemspec b/samples/openapi3/client/petstore/ruby-faraday/petstore.gemspec index 4a13929b6ecc..8dd0008e920d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb index 6aee4e8bcdcc..631990310c71 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb index 85e1f2b92a80..445243c87b1a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb index 02368ff05bd0..a693f7ffe967 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb index 7439b1a3841a..19929e8939f0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb index 3aae88a9a364..3e66110ea2fc 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb index 027c8bc984a3..b83859edd6ed 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb index 2f9e22b4cfc7..216172b7aa08 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb index 705149406d3e..bd7d495672bf 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/configuration_spec.rb index 9e8e7d809833..67cb5ef0fe23 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb index a5e41bae984e..ba46e48f1d7e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb index fbcf3c6c8de4..5a53866a883f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb index bb646f76391d..dc3ededbeffc 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb index 5bf0f0e8a690..7709c7864c1f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb index cbd744021b84..adc9db6b3711 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb index a65aff44e76d..8c617b4925c4 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb index 1feac907fd96..7f4b2d20547f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb index 5b320fa5f3bd..3e9b5a7d2ba8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb index 05885ebe24cc..f3971b6087c3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb index b22981067674..7b5a69a92b9e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb index 8c18d865f3a4..9feff10a2fc9 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/client_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/client_spec.rb index 55b62d8c47a8..7ef018537ab2 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/client_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb index 2d968408e496..96bb0c7151cc 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb index 9194b54a8a87..ea14fab18378 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb index 15c81256a14a..0bc936038643 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb index 2f1ddaed7036..718d50f0ef75 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb index 2424d0ee37dc..528f61b1713f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb index c0604d2e0eae..b645b814b7a0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb index 3d0d56e1b3ad..1455cd8fe49f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb index d9dece5209c2..36493c016659 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb index e59fd8762f32..5a7b4345f4ce 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb index 17cc0a96ea95..94ceb588b589 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb index 598d1e32d42a..b155722289d1 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb index c95ba130ba8d..a7f6edbe190d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb index c237f869836b..47baa8391387 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb index 47fa17484863..cf778b63ad95 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb index ed5af3f6a1d2..4c06f149f8ab 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb index ec793743f9e4..adc7f7fbf1a3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb index e3b9230f5cae..26b75fb14d16 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb index ea8dcd42bdb2..0020490a5a2e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb index 896ac528af03..712bc60fc975 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb index 8f1dd9745afa..68af369edb6c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb index 3e79c17393e8..74682d5070f8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb index 96c30d045a42..17d81cd53e11 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb index ae41ba5fb04b..9955c485a22f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb index 1576729614f4..8231e889df4a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb index b88e09be78fa..f66f12cd6755 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb index ed84ea33158c..5279dc3d1517 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb index fbc30effe671..dc78d58c6295 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb index 3f5df785a307..5d5867a960ef 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb index d4783e8ea885..7eeed2cdeb1f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb index 31e3c31a983c..3d294381a1e0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb index 48dd2a08e10a..c89576633534 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb index a100a994126b..81489e56efb5 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb index 44e4f1860912..377ea72bdbaa 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb index 2bb17df497ce..85634671a39d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb index d93b1bcbbaea..d0ac24aa1b4a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb index 15653d9340dc..01f21801e0f3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb index af77c56f1b07..999f4e0d087c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb index 86d9d2cc924b..604b23f2d6f6 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION b/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore.rb b/samples/openapi3/client/petstore/ruby/lib/petstore.rb index bcfb2040b3c1..a97effa8a625 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 1a1010a8761d..c09a8987705d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb index bed5d58e028d..fbe3ffa51ae0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb index 381a65ae9ccb..9b0f9166f865 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 3379fb9f9fe9..c58118dbea81 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb index 8dde448e0238..97c9812fe84e 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb index d2db575d5012..38d0f31a3786 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb index 779395d32348..4c5f00785c8f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb index 2a8027e2e923..d8ad17556c20 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb index 93abd6f7dd34..7858bb13bdc8 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb index 39a017ba8e0d..6b5769fbe28d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index db0a19529b9d..fe4c8d5c2b72 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb index fb2487e99aa1..e65d1bc0a92f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb index 1ec744fd6fc4..961a46ad5a35 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 3d7b6966c5ab..44b0c4e3f941 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 1717f521e714..a86a56f9c8fb 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb index 893302c2ef8f..b8396f438490 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb index 94bfa2273add..0d4db6874383 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb index 637b67a38b66..3956b56883f2 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 6dc13cbd2b85..b38e13ccaa06 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb index d7e6a1fd9eb9..bd0f325df6eb 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb index d24a651b6dfa..e28645b4d960 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb index 9457f2591e82..be4e1cca84fe 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb index 3d6bfce3f827..cdf26646acc6 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index 61a55de7ffaa..544dadad073e 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index b3b26138785e..4a4b90e3660d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb index 9b2c8a399907..fb5aa9902991 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb index 28adcff9fb6a..625ff1a325d3 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb index b71a8676b76e..824104607385 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index dab73dc4bcbb..9fec8d6e90c6 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb index 32b1a33570ef..cbf85e6c26e9 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb index 9dc3296dfb52..0810ffde584b 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 2c22b38453f3..d0455fc19872 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb index ea946134b5d5..bb090fbaf5a1 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb index 3140ed41a420..225918f14911 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb index 27557505ca70..0dd41bb252c4 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object1.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb index 73e500af56eb..b45bef1a7ea9 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object2.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb index 6ab144d8fd09..b38aa479c197 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object3.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb index 255475c06f7e..a60685d201c8 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object4.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb index 2a213bb0c0cf..91b593e5a4ef 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_object5.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 8b5c138c1595..78c0118e178e 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb index a6770da4d348..bb8eb19ff57f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb index 3974d29af515..73b90ac3ee8b 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 991773081e33..741f21a70351 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb index 6858f297eaef..e109fbf5ac7e 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb index 8f5040f9f376..0ae5c500ec83 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb index d3c3fe021c35..1d4a303b728e 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb index 959f610a9590..892065c96bae 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb index b7490b8a77f1..a0543406f79c 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb index e7280550f551..f5703047911d 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb index a7155714e13c..ea548122be7c 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb index 029932deb7d3..8f52a86f79f3 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index d9e3da079bba..3b81ff2768c0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index ba2b947522a9..60d759918aea 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index 0e3dae64d8d4..5935a5d54e41 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb index 6aebd504d0a7..a9325c08822c 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 36c5476c27c1..6f13c918a4b8 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb index 38a7ad79b181..d0630169a477 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb index fe7741c5dae3..994f11913d76 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb index 34c305b5500b..2982c9057759 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb index 2aea062de9a9..893581c1e01f 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/petstore.gemspec b/samples/openapi3/client/petstore/ruby/petstore.gemspec index d5df4a5e3add..de4035b3b8b9 100644 --- a/samples/openapi3/client/petstore/ruby/petstore.gemspec +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb index 6aee4e8bcdcc..631990310c71 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb index 85e1f2b92a80..445243c87b1a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb index 02368ff05bd0..a693f7ffe967 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb index 7439b1a3841a..19929e8939f0 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb index 3aae88a9a364..3e66110ea2fc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb index 027c8bc984a3..b83859edd6ed 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb index 2f9e22b4cfc7..216172b7aa08 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb index b1b795b5c8b9..bef4a88a2e3b 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb b/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb index 9e8e7d809833..67cb5ef0fe23 100644 --- a/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index a5e41bae984e..ba46e48f1d7e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb index fbcf3c6c8de4..5a53866a883f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb index bb646f76391d..dc3ededbeffc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb index 5bf0f0e8a690..7709c7864c1f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb index cbd744021b84..adc9db6b3711 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb index a65aff44e76d..8c617b4925c4 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb index 1feac907fd96..7f4b2d20547f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb index 5b320fa5f3bd..3e9b5a7d2ba8 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb index 05885ebe24cc..f3971b6087c3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb index b22981067674..7b5a69a92b9e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb index 8c18d865f3a4..9feff10a2fc9 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb index 55b62d8c47a8..7ef018537ab2 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb index 2d968408e496..96bb0c7151cc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb index 9194b54a8a87..ea14fab18378 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb index 15c81256a14a..0bc936038643 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb index 2f1ddaed7036..718d50f0ef75 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb index 2424d0ee37dc..528f61b1713f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb index c0604d2e0eae..b645b814b7a0 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb index 3d0d56e1b3ad..1455cd8fe49f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb index d9dece5209c2..36493c016659 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb index e59fd8762f32..5a7b4345f4ce 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb index 17cc0a96ea95..94ceb588b589 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb index 598d1e32d42a..b155722289d1 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb index c95ba130ba8d..a7f6edbe190d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb index c237f869836b..47baa8391387 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb index 47fa17484863..cf778b63ad95 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb index ed5af3f6a1d2..4c06f149f8ab 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb index ec793743f9e4..adc7f7fbf1a3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb index e3b9230f5cae..26b75fb14d16 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb index ea8dcd42bdb2..0020490a5a2e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb index 896ac528af03..712bc60fc975 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb index 8f1dd9745afa..68af369edb6c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb index 3e79c17393e8..74682d5070f8 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb index 96c30d045a42..17d81cd53e11 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb index ae41ba5fb04b..9955c485a22f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb index 1576729614f4..8231e889df4a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb index b88e09be78fa..f66f12cd6755 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb index ed84ea33158c..5279dc3d1517 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb index fbc30effe671..dc78d58c6295 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb index 3f5df785a307..5d5867a960ef 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb index d4783e8ea885..7eeed2cdeb1f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb index 31e3c31a983c..3d294381a1e0 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb index 48dd2a08e10a..c89576633534 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb index a100a994126b..81489e56efb5 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb index 44e4f1860912..377ea72bdbaa 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb index 2bb17df497ce..85634671a39d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb index d93b1bcbbaea..d0ac24aa1b4a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb index 15653d9340dc..01f21801e0f3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb index af77c56f1b07..999f4e0d087c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb b/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb index 86d9d2cc924b..604b23f2d6f6 100644 --- a/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/openapi3/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: 4.2.1-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 36880a55c7ca..b64372371df5 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 4.2.1-SNAPSHOT. +Generated by OpenAPI Generator 4.3.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION +++ b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim/.openapi-generator/VERSION b/samples/server/petstore/php-slim/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/php-slim/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION index d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 48e06a9e5fc2..ee03ed007a86 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 851b3e054c74..4cf13b7604a4 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 e75ef015a3aa..8df58660fd0e 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d12ba9ed6429..5c7615ea0710 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 2dc313a53b8a..04488dc29127 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 8ede362ba0fe..a68f37d2e188 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 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 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 9a93b057baad..fc651f68acb9 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 68ff26c0e132..57e8a7a15429 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 483949a5cb6b..0da19ea61ee8 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 be0c56e311ed..19101fcc9eb8 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 b9b13f85b21d..db626c010256 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 4e63f5635ff7..e2439ca2db01 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 55bdc0bf90bc..4ed3751500e3 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 2b9c9f7c8346..12933abb0ffd 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 c2153019f90d..37f9be646311 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 000ef502c145..00d64e9689b4 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 cf718dd94665..d1411f5acf99 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 e6a0ba0066ca..e826794e3529 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 55bdc0bf90bc..4ed3751500e3 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 2b9c9f7c8346..12933abb0ffd 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 c2153019f90d..37f9be646311 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 000ef502c145..00d64e9689b4 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 cf718dd94665..d1411f5acf99 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 e6a0ba0066ca..e826794e3529 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 b5016e6d0b51..de738d977f86 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 4f267d7e752f..81d3a0af1c3b 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 999b32457606..0b69f3bc048a 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 fb954826de89..ff1111a0304e 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 1354d5bdafd3..6201be5e6079 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 32d850b0520b..0f4a1561478c 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 55bdc0bf90bc..4ed3751500e3 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 2b9c9f7c8346..12933abb0ffd 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 c2153019f90d..37f9be646311 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 000ef502c145..00d64e9689b4 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 cf718dd94665..d1411f5acf99 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 e6a0ba0066ca..e826794e3529 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 29b51909fd90..296292e4bc5c 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 3d76194529fe..2ac47348c110 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 cf696d7bd304..cd3a11135192 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 f576eb40b0b1..8a5a6c41368b 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 27165f532d08..70c500f68575 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 6a63e6c793f9..1afb9f6e5209 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 50a32f5a2f2c..d5463f464402 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 3f5b6166fa14..e52d0c471fd7 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 c8f951cf3d75..a3297c42be8f 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 70ef1c153796..91a3de95cd6d 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 90a20f796ecd..0e5eb19a044e 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 9e155441052b..ff44402b0e5e 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 9a93b057baad..fc651f68acb9 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 bc118661dbdd..cdfe9b156a40 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 483949a5cb6b..0da19ea61ee8 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 84413287f672..e329de187e7c 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 b9b13f85b21d..db626c010256 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 4e63f5635ff7..e2439ca2db01 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 b7618b9d629b..4c536b55a06b 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 66625909854b..afe536b21787 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d43199bbe13d..f0d7605a2aac 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 adc1d0361250..df9848c22493 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d7c3e5ad9863..ad48bf12005e 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 f660e7a899e2..cd6c895e796e 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 d168f1d8bdaa..bfbf77eb7fad 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.3.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 9a93b057baad..fc651f68acb9 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 57da91087ca6..b75888dafc3c 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 483949a5cb6b..0da19ea61ee8 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 be0c56e311ed..19101fcc9eb8 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 b9b13f85b21d..db626c010256 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.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 4e63f5635ff7..e2439ca2db01 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) (4.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.3.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ From a528323c5f30640f8c18ec12ed49cde64b040f39 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 21 Nov 2019 14:09:30 +0800 Subject: [PATCH 02/72] update samples --- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php | 4 ---- .../test/Api/FakeClassnameTags123ApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php | 4 ---- .../test/Model/AdditionalPropertiesAnyTypeTest.php | 4 ---- .../test/Model/AdditionalPropertiesArrayTest.php | 4 ---- .../test/Model/AdditionalPropertiesBooleanTest.php | 4 ---- .../test/Model/AdditionalPropertiesClassTest.php | 4 ---- .../test/Model/AdditionalPropertiesIntegerTest.php | 4 ---- .../test/Model/AdditionalPropertiesNumberTest.php | 4 ---- .../test/Model/AdditionalPropertiesObjectTest.php | 4 ---- .../test/Model/AdditionalPropertiesStringTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 4 ---- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 4 ---- .../OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/CapitalizationTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/CatAllOfTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/CategoryTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/ClientTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/DogAllOfTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/EnumClassTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/EnumTestTest.php | 4 ---- .../OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/FileTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php | 4 ---- .../Model/MixedPropertiesAndAdditionalPropertiesClassTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/Model200ResponseTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ModelListTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/NameTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/OrderTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/OuterCompositeTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 4 ---- .../OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php | 4 ---- .../OpenAPIClient-php/test/Model/TypeHolderExampleTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/UserTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php | 4 ---- 52 files changed, 208 deletions(-) diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 133dea018539..a24c2dde30ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 3e22de6658e6..9d56f364947c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index 7f3ec6a9bd6a..32f0245b790d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 0826a8b1c99f..27573e508715 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 36425e2c4f83..25dbb7bd8643 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index bf0f8954ddb1..5e45da208342 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php index e2200e85df49..f30026e64435 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php index 32c6eb945380..418b7cead0b0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php index 290a1d82ad53..6a35bbda13f7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index c26080912922..af88f1d72ac6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php index a71b764c5b93..7a6b253a7a30 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php index 6041a48625e0..c6784687d402 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php index 800c9cfba104..795c6d83655f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php index bcd86c9c03f9..dd25f666812a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index b13a851eb5d5..b3714413d397 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 9edb93a83645..56514da3d141 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 5ef98f1f2bc8..048b08cc736e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 3ef1a3694a09..63ca6fe26e9d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index e936aef33fe8..4fc7866a2346 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 89d6385fc87b..57f23ba252b7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index fc16b011388f..2028ab3ad11e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 1bf163b27650..87d06421f315 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 3b9c6a71ba62..c160c602cb5b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 6b2783741a18..eeede0b850a3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index f13f8fa74c38..f3fa825af8f6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index ed77467bfb2d..64f2ea9e0aac 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 2f493383dba3..3423f10cb40e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index adb492648297..94188a250dc4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 9d3b71bd27e3..7fe49192af70 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 43fe33be8f11..0a6ae0b6ac7a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index 8db383615eb2..74f5b87a1abd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index 1e8c12076640..a8eedbc15a98 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index 86c2bf60de8d..ce1d3866fc9b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 2c6b904bed65..24fe5ebba13b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index 22c8e8a8f74e..b3fdcce373ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index df0b61895e5d..7f4909929bd7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index d303bfa00681..32e0816e0256 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 340e7fc52e45..bf1035dd78f2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index d7d63b5911a6..46171d9c06d9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 5311d0fe5bf2..8e758324738a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 1dc3d4c2d127..c510627df773 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index c3088a2e39fc..4a9384372723 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 755a327e5506..d9635986d540 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index a9a39d1a24f5..6dfd00288c04 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index e661c56ef766..e7b6f303c775 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 136522d9f968..c9108b0cb05f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 0047eb8078bf..f15c9786c213 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 0fbc6b2cf2a5..afe28ca6f90c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php index 225d58db102a..6c8b90d3d3c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php index d61450d98b76..16ab32fa56e3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index a352a546cc7e..82a19ce00af8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php index 6b4968e8eb0b..00fa0f763e3d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** From fffe7c8a832c9bc523253cb4d1e4bf270bd651c1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 23 Nov 2019 00:24:50 +0800 Subject: [PATCH 03/72] update samples --- docs/generators/kotlin.md | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 6 +----- .../go-experimental/go-petstore/.openapi-generator/VERSION | 6 +----- .../client/petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- samples/client/petstore/nim/.openapi-generator/VERSION | 6 +----- .../client/petstore/ruby/spec/api/another_fake_api_spec.rb | 4 ---- samples/client/petstore/ruby/spec/api/fake_api_spec.rb | 4 ---- .../ruby/spec/api/fake_classname_tags123_api_spec.rb | 4 ---- samples/client/petstore/ruby/spec/api/pet_api_spec.rb | 4 ---- samples/client/petstore/ruby/spec/api/store_api_spec.rb | 4 ---- samples/client/petstore/ruby/spec/api/user_api_spec.rb | 4 ---- samples/client/petstore/ruby/spec/api_client_spec.rb | 4 ---- samples/client/petstore/ruby/spec/configuration_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_any_type_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_array_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_boolean_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_class_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_integer_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_number_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_object_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_string_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/animal_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/api_response_spec.rb | 4 ---- .../ruby/spec/models/array_of_array_of_number_only_spec.rb | 4 ---- .../petstore/ruby/spec/models/array_of_number_only_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/array_test_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/capitalization_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/cat_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/category_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/class_model_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/client_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/dog_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/enum_arrays_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/enum_class_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/enum_test_spec.rb | 4 ---- .../ruby/spec/models/file_schema_test_class_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/file_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/format_test_spec.rb | 4 ---- .../petstore/ruby/spec/models/has_only_read_only_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/list_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/map_test_spec.rb | 4 ---- ...mixed_properties_and_additional_properties_class_spec.rb | 4 ---- .../petstore/ruby/spec/models/model200_response_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/model_return_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/name_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/number_only_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/order_spec.rb | 4 ---- .../petstore/ruby/spec/models/outer_composite_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/outer_enum_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/pet_spec.rb | 4 ---- .../petstore/ruby/spec/models/read_only_first_spec.rb | 4 ---- .../petstore/ruby/spec/models/special_model_name_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/tag_spec.rb | 4 ---- .../petstore/ruby/spec/models/type_holder_default_spec.rb | 4 ---- .../petstore/ruby/spec/models/type_holder_example_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/user_spec.rb | 4 ---- samples/client/petstore/ruby/spec/models/xml_item_spec.rb | 4 ---- samples/client/petstore/ruby/spec/spec_helper.rb | 4 ---- .../single-request-parameter/.openapi-generator/VERSION | 2 +- .../with-prefixed-module-name/.openapi-generator/VERSION | 6 +----- .../builds/typescript-three-plus/.openapi-generator/VERSION | 6 +----- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../petstore/go/go-petstore/.openapi-generator/VERSION | 6 +----- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 4 ---- .../php/OpenAPIClient-php/test/Api/DefaultApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php | 4 ---- .../test/Api/FakeClassnameTags123ApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php | 4 ---- .../php/OpenAPIClient-php/test/Api/StoreApiTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php | 4 ---- .../test/Model/AdditionalPropertiesClassTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/AnimalTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 4 ---- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 4 ---- .../OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/CapitalizationTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/CatAllOfTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/CategoryTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ClientTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/DogAllOfTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/EnumClassTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/EnumTestTest.php | 4 ---- .../test/Model/FileSchemaTestClassTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/FileTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/FooTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 4 ---- .../OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 4 ---- .../OpenAPIClient-php/test/Model/HealthCheckResultTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/InlineObject1Test.php | 4 ---- .../php/OpenAPIClient-php/test/Model/InlineObject2Test.php | 4 ---- .../php/OpenAPIClient-php/test/Model/InlineObject3Test.php | 4 ---- .../php/OpenAPIClient-php/test/Model/InlineObject4Test.php | 4 ---- .../php/OpenAPIClient-php/test/Model/InlineObject5Test.php | 4 ---- .../php/OpenAPIClient-php/test/Model/InlineObjectTest.php | 4 ---- .../test/Model/InlineResponseDefaultTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/MapTestTest.php | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassTest.php | 4 ---- .../OpenAPIClient-php/test/Model/Model200ResponseTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ModelListTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/NameTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/NullableClassTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/OrderTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/OuterCompositeTest.php | 4 ---- .../test/Model/OuterEnumDefaultValueTest.php | 4 ---- .../test/Model/OuterEnumIntegerDefaultValueTest.php | 4 ---- .../OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 4 ---- .../php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 4 ---- .../OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 4 ---- .../petstore/php/OpenAPIClient-php/test/Model/UserTest.php | 4 ---- .../petstore/ruby-faraday/spec/api/another_fake_api_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/api/default_api_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/api/fake_api_spec.rb | 4 ---- .../spec/api/fake_classname_tags123_api_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/api/pet_api_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/api/store_api_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/api/user_api_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/api_client_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/configuration_spec.rb | 4 ---- .../spec/models/additional_properties_class_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/animal_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/api_response_spec.rb | 4 ---- .../spec/models/array_of_array_of_number_only_spec.rb | 4 ---- .../ruby-faraday/spec/models/array_of_number_only_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/array_test_spec.rb | 4 ---- .../ruby-faraday/spec/models/capitalization_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/cat_all_of_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/cat_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/category_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/class_model_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/client_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/dog_all_of_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/dog_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/enum_arrays_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/enum_class_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/enum_test_spec.rb | 4 ---- .../ruby-faraday/spec/models/file_schema_test_class_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/file_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/foo_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/format_test_spec.rb | 4 ---- .../ruby-faraday/spec/models/has_only_read_only_spec.rb | 4 ---- .../ruby-faraday/spec/models/health_check_result_spec.rb | 4 ---- .../ruby-faraday/spec/models/inline_object1_spec.rb | 4 ---- .../ruby-faraday/spec/models/inline_object2_spec.rb | 4 ---- .../ruby-faraday/spec/models/inline_object3_spec.rb | 4 ---- .../ruby-faraday/spec/models/inline_object4_spec.rb | 4 ---- .../ruby-faraday/spec/models/inline_object5_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/inline_object_spec.rb | 4 ---- .../spec/models/inline_response_default_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/list_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/map_test_spec.rb | 4 ---- ...mixed_properties_and_additional_properties_class_spec.rb | 4 ---- .../ruby-faraday/spec/models/model200_response_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/model_return_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/name_spec.rb | 4 ---- .../ruby-faraday/spec/models/nullable_class_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/number_only_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/order_spec.rb | 4 ---- .../ruby-faraday/spec/models/outer_composite_spec.rb | 4 ---- .../spec/models/outer_enum_default_value_spec.rb | 4 ---- .../spec/models/outer_enum_integer_default_value_spec.rb | 4 ---- .../ruby-faraday/spec/models/outer_enum_integer_spec.rb | 4 ---- .../petstore/ruby-faraday/spec/models/outer_enum_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/pet_spec.rb | 4 ---- .../ruby-faraday/spec/models/read_only_first_spec.rb | 4 ---- .../ruby-faraday/spec/models/special_model_name_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/tag_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/models/user_spec.rb | 4 ---- .../client/petstore/ruby-faraday/spec/spec_helper.rb | 4 ---- .../client/petstore/ruby/spec/api/another_fake_api_spec.rb | 4 ---- .../client/petstore/ruby/spec/api/default_api_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb | 4 ---- .../ruby/spec/api/fake_classname_tags123_api_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb | 4 ---- .../client/petstore/ruby/spec/api/store_api_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/api/user_api_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/api_client_spec.rb | 4 ---- .../client/petstore/ruby/spec/configuration_spec.rb | 4 ---- .../ruby/spec/models/additional_properties_class_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/animal_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/api_response_spec.rb | 4 ---- .../ruby/spec/models/array_of_array_of_number_only_spec.rb | 4 ---- .../petstore/ruby/spec/models/array_of_number_only_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/array_test_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/capitalization_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/cat_all_of_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/cat_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/category_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/class_model_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/client_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/dog_all_of_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/dog_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/enum_arrays_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/enum_class_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/enum_test_spec.rb | 4 ---- .../ruby/spec/models/file_schema_test_class_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/file_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/foo_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/format_test_spec.rb | 4 ---- .../petstore/ruby/spec/models/has_only_read_only_spec.rb | 4 ---- .../petstore/ruby/spec/models/health_check_result_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/inline_object1_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/inline_object2_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/inline_object3_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/inline_object4_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/inline_object5_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/inline_object_spec.rb | 4 ---- .../ruby/spec/models/inline_response_default_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/list_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/map_test_spec.rb | 4 ---- ...mixed_properties_and_additional_properties_class_spec.rb | 4 ---- .../petstore/ruby/spec/models/model200_response_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/model_return_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/name_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/nullable_class_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/number_only_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/order_spec.rb | 4 ---- .../petstore/ruby/spec/models/outer_composite_spec.rb | 4 ---- .../ruby/spec/models/outer_enum_default_value_spec.rb | 4 ---- .../spec/models/outer_enum_integer_default_value_spec.rb | 4 ---- .../petstore/ruby/spec/models/outer_enum_integer_spec.rb | 4 ---- .../client/petstore/ruby/spec/models/outer_enum_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/pet_spec.rb | 4 ---- .../petstore/ruby/spec/models/read_only_first_spec.rb | 4 ---- .../petstore/ruby/spec/models/special_model_name_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/tag_spec.rb | 4 ---- .../openapi3/client/petstore/ruby/spec/models/user_spec.rb | 4 ---- samples/openapi3/client/petstore/ruby/spec/spec_helper.rb | 4 ---- .../petstore/go-api-server/.openapi-generator/VERSION | 6 +----- .../server/petstore/php-slim4/.openapi-generator/VERSION | 6 +----- 244 files changed, 15 insertions(+), 963 deletions(-) diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 4c35ec6f36cc..ec9a4e0332a7 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -17,4 +17,4 @@ sidebar_label: kotlin |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| |dateLibrary|Option. Date library to use|
**string**
String
**java8**
Java 8 native JSR310 (jvm only)
**threetenbp**
Threetenbp (jvm only)
|java8| |collectionType|Option. Collection type to use|
**array**
kotlin.Array
**list**
kotlin.collections.List
|array| -|library|Library template (sub-template) to use|
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm-okhttp4| +|library|Library template (sub-template) to use|
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm-okhttp4| 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 60e4bdf6f21d..bfbf77eb7fad 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION index 60e4bdf6f21d..bfbf77eb7fad 100644 --- a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.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 e4955748d3e7..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.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 e4955748d3e7..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.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 e4955748d3e7..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.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 e4955748d3e7..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.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 60e4bdf6f21d..bfbf77eb7fad 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb index 376dfef4d437..b4543ee51447 100644 --- a/samples/client/petstore/ruby/spec/api/another_fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/another_fake_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb index 86450033a4d0..b495d44f4edf 100644 --- a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb index e766376e8b59..ea56a91cdc3d 100644 --- a/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_classname_tags123_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/api/pet_api_spec.rb b/samples/client/petstore/ruby/spec/api/pet_api_spec.rb index ff4dc274bc09..d9cffeab99ba 100644 --- a/samples/client/petstore/ruby/spec/api/pet_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/pet_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/client/petstore/ruby/spec/api/store_api_spec.rb index 57f3119c04d5..3322df77682d 100644 --- a/samples/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/store_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/client/petstore/ruby/spec/api/user_api_spec.rb index 942cf23060db..1cff275207b8 100644 --- a/samples/client/petstore/ruby/spec/api/user_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/user_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index 80d046123bcb..bef4a88a2e3b 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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index 020006b7044f..67cb5ef0fe23 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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb index a2b5e6e1a98a..4c0d4b289d8e 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_any_type_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_any_type_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb index 66940817e7db..562e61a52542 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_array_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_array_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb index cb201e1c95ad..aa92df861796 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_boolean_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_boolean_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index 312195735b74..37c0bb91c42d 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb index 45f3dd833f66..d959476f825a 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_integer_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_integer_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb index a61e320cff05..67a7519638e3 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_number_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_number_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb index 0bc9bcb3eeb1..f6e9d0807c81 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_object_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_object_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb index cc85e515b5b8..f8e4e50164c8 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_string_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_string_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/animal_spec.rb b/samples/client/petstore/ruby/spec/models/animal_spec.rb index 5ab5e125d424..5a53866a883f 100644 --- a/samples/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/client/petstore/ruby/spec/models/animal_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/client/petstore/ruby/spec/models/api_response_spec.rb index acdbc13a6c16..dc3ededbeffc 100644 --- a/samples/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/api_response_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb b/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb index d4c4b83ab9d4..7709c7864c1f 100644 --- a/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_of_array_of_number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb b/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb index 75dbc8123fa6..adc9db6b3711 100644 --- a/samples/client/petstore/ruby/spec/models/array_of_number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_of_number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/client/petstore/ruby/spec/models/array_test_spec.rb index 2e3690254cd0..8c617b4925c4 100644 --- a/samples/client/petstore/ruby/spec/models/array_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/array_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/capitalization_spec.rb b/samples/client/petstore/ruby/spec/models/capitalization_spec.rb index c0a52907ce19..7f4b2d20547f 100644 --- a/samples/client/petstore/ruby/spec/models/capitalization_spec.rb +++ b/samples/client/petstore/ruby/spec/models/capitalization_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb index 36015763d88a..3e9b5a7d2ba8 100644 --- a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_all_of_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/cat_spec.rb b/samples/client/petstore/ruby/spec/models/cat_spec.rb index 9b925b1bfc7e..f3971b6087c3 100644 --- a/samples/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/category_spec.rb b/samples/client/petstore/ruby/spec/models/category_spec.rb index 3f19ebba9388..7b5a69a92b9e 100644 --- a/samples/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/client/petstore/ruby/spec/models/category_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/class_model_spec.rb b/samples/client/petstore/ruby/spec/models/class_model_spec.rb index de1ba1f05cdc..9feff10a2fc9 100644 --- a/samples/client/petstore/ruby/spec/models/class_model_spec.rb +++ b/samples/client/petstore/ruby/spec/models/class_model_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/client_spec.rb b/samples/client/petstore/ruby/spec/models/client_spec.rb index 95f3a0f5d6cc..7ef018537ab2 100644 --- a/samples/client/petstore/ruby/spec/models/client_spec.rb +++ b/samples/client/petstore/ruby/spec/models/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb index 140f56c41d06..96bb0c7151cc 100644 --- a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_all_of_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/dog_spec.rb b/samples/client/petstore/ruby/spec/models/dog_spec.rb index 60b29c9a2cab..ea14fab18378 100644 --- a/samples/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb b/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb index c2341fc9cb8f..0bc936038643 100644 --- a/samples/client/petstore/ruby/spec/models/enum_arrays_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_arrays_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb index d18cdadd6326..718d50f0ef75 100644 --- a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb index f14060b54d1f..13072b398bcc 100644 --- a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb b/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb index 5293d2e45153..b645b814b7a0 100644 --- a/samples/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/file_schema_test_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/file_spec.rb b/samples/client/petstore/ruby/spec/models/file_spec.rb index ea348574984d..1455cd8fe49f 100644 --- a/samples/client/petstore/ruby/spec/models/file_spec.rb +++ b/samples/client/petstore/ruby/spec/models/file_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb index 92784b4bffc5..ddf3f180af75 100644 --- a/samples/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/format_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb b/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb index c9cef2385153..94ceb588b589 100644 --- a/samples/client/petstore/ruby/spec/models/has_only_read_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/has_only_read_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/list_spec.rb b/samples/client/petstore/ruby/spec/models/list_spec.rb index 36cbbc1e9ad2..712bc60fc975 100644 --- a/samples/client/petstore/ruby/spec/models/list_spec.rb +++ b/samples/client/petstore/ruby/spec/models/list_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/map_test_spec.rb b/samples/client/petstore/ruby/spec/models/map_test_spec.rb index c659b037e70b..68af369edb6c 100644 --- a/samples/client/petstore/ruby/spec/models/map_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/map_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb index 4d8952aaa4eb..74682d5070f8 100644 --- a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/model200_response_spec.rb b/samples/client/petstore/ruby/spec/models/model200_response_spec.rb index a933d442d59a..17d81cd53e11 100644 --- a/samples/client/petstore/ruby/spec/models/model200_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model200_response_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/client/petstore/ruby/spec/models/model_return_spec.rb index 31eeabd78fa5..9955c485a22f 100644 --- a/samples/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model_return_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/name_spec.rb b/samples/client/petstore/ruby/spec/models/name_spec.rb index b0f8ba601297..8231e889df4a 100644 --- a/samples/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/name_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/number_only_spec.rb b/samples/client/petstore/ruby/spec/models/number_only_spec.rb index 86073d4404f0..5279dc3d1517 100644 --- a/samples/client/petstore/ruby/spec/models/number_only_spec.rb +++ b/samples/client/petstore/ruby/spec/models/number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/order_spec.rb b/samples/client/petstore/ruby/spec/models/order_spec.rb index d2249f7101c0..dc78d58c6295 100644 --- a/samples/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/client/petstore/ruby/spec/models/order_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb b/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb index d5300f0a41f4..5d5867a960ef 100644 --- a/samples/client/petstore/ruby/spec/models/outer_composite_spec.rb +++ b/samples/client/petstore/ruby/spec/models/outer_composite_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb b/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb index 2085fde52fef..81489e56efb5 100644 --- a/samples/client/petstore/ruby/spec/models/outer_enum_spec.rb +++ b/samples/client/petstore/ruby/spec/models/outer_enum_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/pet_spec.rb b/samples/client/petstore/ruby/spec/models/pet_spec.rb index 4df9e3fa819e..377ea72bdbaa 100644 --- a/samples/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/models/pet_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb index a380cd95dd16..85634671a39d 100644 --- a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb +++ b/samples/client/petstore/ruby/spec/models/read_only_first_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb index 2aa1094cc2bb..d0ac24aa1b4a 100644 --- a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/special_model_name_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/tag_spec.rb b/samples/client/petstore/ruby/spec/models/tag_spec.rb index 0b05f6e4775d..01f21801e0f3 100644 --- a/samples/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/client/petstore/ruby/spec/models/tag_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb b/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb index 6257cc53cbcf..433a060a4508 100644 --- a/samples/client/petstore/ruby/spec/models/type_holder_default_spec.rb +++ b/samples/client/petstore/ruby/spec/models/type_holder_default_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb b/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb index 7e23e033089b..8a8bc5c89500 100644 --- a/samples/client/petstore/ruby/spec/models/type_holder_example_spec.rb +++ b/samples/client/petstore/ruby/spec/models/type_holder_example_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/user_spec.rb b/samples/client/petstore/ruby/spec/models/user_spec.rb index 6896fda990ff..999f4e0d087c 100644 --- a/samples/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/client/petstore/ruby/spec/models/user_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/models/xml_item_spec.rb b/samples/client/petstore/ruby/spec/models/xml_item_spec.rb index 39b204a6034f..2a35a5c3ab42 100644 --- a/samples/client/petstore/ruby/spec/models/xml_item_spec.rb +++ b/samples/client/petstore/ruby/spec/models/xml_item_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index 00fa66dac8ca..604b23f2d6f6 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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end 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 e4955748d3e7..bfbf77eb7fad 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 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.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 60e4bdf6f21d..bfbf77eb7fad 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 -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.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 60e4bdf6f21d..bfbf77eb7fad 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 -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.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 e4955748d3e7..bfbf77eb7fad 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 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.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 60e4bdf6f21d..bfbf77eb7fad 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 -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 133dea018539..a24c2dde30ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php index f98ba2d5ae3f..e42429547f68 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index a6da9e571970..5fa376e79a48 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index 7f3ec6a9bd6a..32f0245b790d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 0826a8b1c99f..27573e508715 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 36425e2c4f83..25dbb7bd8643 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index bf0f8954ddb1..5e45da208342 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,11 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 33787afc6dff..59556f799a90 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index b13a851eb5d5..b3714413d397 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 9edb93a83645..56514da3d141 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 5ef98f1f2bc8..048b08cc736e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 3ef1a3694a09..63ca6fe26e9d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index e936aef33fe8..4fc7866a2346 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 89d6385fc87b..57f23ba252b7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index fc16b011388f..2028ab3ad11e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 1bf163b27650..87d06421f315 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 3b9c6a71ba62..c160c602cb5b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 6b2783741a18..eeede0b850a3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index f13f8fa74c38..f3fa825af8f6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index ed77467bfb2d..64f2ea9e0aac 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 2f493383dba3..3423f10cb40e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index adb492648297..94188a250dc4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 9d3b71bd27e3..7fe49192af70 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 43b6287e7670..e98672a80254 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index 8db383615eb2..74f5b87a1abd 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index 1e8c12076640..a8eedbc15a98 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php index 13c6e1b6402e..02ef4226b59e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index b77bb8271258..05a24cbf6859 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 2c6b904bed65..24fe5ebba13b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php index 13924e8109f7..9728bfc6ae83 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php index e68675e5e4fc..80928c280df9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php index dc4532a6e7b0..b3d3a273468f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php index 8f0cdbc62f10..8ac81e2639b9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php index 6a541d4c7937..9f4e4f349b36 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php index bfc1e5eb9c5d..e7d9353b8d62 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php index a7f70ca2cb90..b5c4c045bac6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php index 31b5e674cbc1..687de052d991 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index 22c8e8a8f74e..b3fdcce373ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index df0b61895e5d..7f4909929bd7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index d303bfa00681..32e0816e0256 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 340e7fc52e45..bf1035dd78f2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index d7d63b5911a6..46171d9c06d9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 5311d0fe5bf2..8e758324738a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php index 76a2aa9bf51e..6161045f63c8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 1dc3d4c2d127..c510627df773 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index c3088a2e39fc..4a9384372723 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 755a327e5506..d9635986d540 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php index 34fd57a60e5a..b0b2df3de387 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php index 1e02e841808d..16a371785b2a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php index b5e3c2b7dfa8..ca66871cf359 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index a9a39d1a24f5..6dfd00288c04 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index e661c56ef766..e7b6f303c775 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 136522d9f968..c9108b0cb05f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 0047eb8078bf..f15c9786c213 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 0fbc6b2cf2a5..afe28ca6f90c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index a352a546cc7e..82a19ce00af8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,11 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 4.3.0-SNAPSHOT -======= - * OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master */ /** diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb index 647c6c78a506..631990310c71 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/another_fake_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb index b42dbbdffb82..445243c87b1a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/default_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb index 1c841b38f18b..a693f7ffe967 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb index f129837820e0..19929e8939f0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/fake_classname_tags123_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb index ee05e1738c66..3e66110ea2fc 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/pet_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb index a55a0aeb467a..b83859edd6ed 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/store_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb index 754ec7b5d134..216172b7aa08 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/api/user_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb index 3dbb705410c7..bd7d495672bf 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/openapi3/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/configuration_spec.rb index 020006b7044f..67cb5ef0fe23 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/openapi3/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb index 0c3899c73287..ba46e48f1d7e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/additional_properties_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb index 5ab5e125d424..5a53866a883f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/animal_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb index acdbc13a6c16..dc3ededbeffc 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/api_response_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb index d4c4b83ab9d4..7709c7864c1f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_array_of_number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb index 75dbc8123fa6..adc9db6b3711 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_of_number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb index 2e3690254cd0..8c617b4925c4 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/array_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb index c0a52907ce19..7f4b2d20547f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/capitalization_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb index 36015763d88a..3e9b5a7d2ba8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_all_of_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb index 9b925b1bfc7e..f3971b6087c3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/cat_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb index 3f19ebba9388..7b5a69a92b9e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/category_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb index de1ba1f05cdc..9feff10a2fc9 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/class_model_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/client_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/client_spec.rb index 95f3a0f5d6cc..7ef018537ab2 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/client_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb index 140f56c41d06..96bb0c7151cc 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_all_of_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb index 60b29c9a2cab..ea14fab18378 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/dog_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb index c2341fc9cb8f..0bc936038643 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_arrays_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb index d18cdadd6326..718d50f0ef75 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb index 411a5afddc31..528f61b1713f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/enum_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb index 5293d2e45153..b645b814b7a0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_schema_test_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb index ea348574984d..1455cd8fe49f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/file_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb index 3a1a3857c55b..36493c016659 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/foo_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb index 3b64423a3a41..5a7b4345f4ce 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/format_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb index c9cef2385153..94ceb588b589 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/has_only_read_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb index b756f732b394..b155722289d1 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/health_check_result_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb index 9cdc200794d3..a7f6edbe190d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object1_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb index 0a6b8e901eff..47baa8391387 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object2_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb index 214ab9dfcbd4..cf778b63ad95 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object3_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb index 0e5843d97a38..4c06f149f8ab 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object4_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb index 95cf79b2636e..adc7f7fbf1a3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object5_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb index 4f09b738b629..26b75fb14d16 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_object_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb index 2650716db768..0020490a5a2e 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/inline_response_default_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb index 36cbbc1e9ad2..712bc60fc975 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/list_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb index c659b037e70b..68af369edb6c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/map_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb index 4d8952aaa4eb..74682d5070f8 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/mixed_properties_and_additional_properties_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb index a933d442d59a..17d81cd53e11 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model200_response_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb index 31eeabd78fa5..9955c485a22f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/model_return_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb index b0f8ba601297..8231e889df4a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/name_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb index bc94dd707c69..f66f12cd6755 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/nullable_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb index 86073d4404f0..5279dc3d1517 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb index d2249f7101c0..dc78d58c6295 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/order_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb index d5300f0a41f4..5d5867a960ef 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_composite_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb index 8f2bd69342d9..7eeed2cdeb1f 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_default_value_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb index 22dcb66fa006..3d294381a1e0 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_default_value_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb index eaadf5d8e560..c89576633534 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_integer_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb index 2085fde52fef..81489e56efb5 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/outer_enum_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb index 4df9e3fa819e..377ea72bdbaa 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/pet_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb index a380cd95dd16..85634671a39d 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/read_only_first_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb index 2aa1094cc2bb..d0ac24aa1b4a 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/special_model_name_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb index 0b05f6e4775d..01f21801e0f3 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/tag_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb index 6896fda990ff..999f4e0d087c 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_spec.rb +++ b/samples/openapi3/client/petstore/ruby-faraday/spec/models/user_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb index 00fa66dac8ca..604b23f2d6f6 100644 --- a/samples/openapi3/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/openapi3/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb index 647c6c78a506..631990310c71 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/another_fake_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb index b42dbbdffb82..445243c87b1a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/default_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/default_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb index 1c841b38f18b..a693f7ffe967 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/fake_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb index f129837820e0..19929e8939f0 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/fake_classname_tags123_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb index ee05e1738c66..3e66110ea2fc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/pet_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/pet_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb index a55a0aeb467a..b83859edd6ed 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/store_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb index 754ec7b5d134..216172b7aa08 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api/user_api_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/api/user_api_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb b/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb index 80d046123bcb..bef4a88a2e3b 100644 --- a/samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb b/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb index 020006b7044f..67cb5ef0fe23 100644 --- a/samples/openapi3/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index 0c3899c73287..ba46e48f1d7e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/additional_properties_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb index 5ab5e125d424..5a53866a883f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/animal_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb index acdbc13a6c16..dc3ededbeffc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/api_response_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb index d4c4b83ab9d4..7709c7864c1f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_of_array_of_number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb index 75dbc8123fa6..adc9db6b3711 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_of_number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb index 2e3690254cd0..8c617b4925c4 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/array_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/array_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb index c0a52907ce19..7f4b2d20547f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/capitalization_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/capitalization_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb index 36015763d88a..3e9b5a7d2ba8 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_all_of_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb index 9b925b1bfc7e..f3971b6087c3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/cat_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb index 3f19ebba9388..7b5a69a92b9e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/category_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb index de1ba1f05cdc..9feff10a2fc9 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/class_model_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/class_model_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb index 95f3a0f5d6cc..7ef018537ab2 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/client_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb index 140f56c41d06..96bb0c7151cc 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/dog_all_of_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb index 60b29c9a2cab..ea14fab18378 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/dog_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb index c2341fc9cb8f..0bc936038643 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_arrays_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb index d18cdadd6326..718d50f0ef75 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb index 411a5afddc31..528f61b1713f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/enum_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb index 5293d2e45153..b645b814b7a0 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/file_schema_test_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb index ea348574984d..1455cd8fe49f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/file_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/file_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb index 3a1a3857c55b..36493c016659 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/foo_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/foo_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb index 3b64423a3a41..5a7b4345f4ce 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/format_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb index c9cef2385153..94ceb588b589 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/has_only_read_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb index b756f732b394..b155722289d1 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/health_check_result_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb index 9cdc200794d3..a7f6edbe190d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object1_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb index 0a6b8e901eff..47baa8391387 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object2_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb index 214ab9dfcbd4..cf778b63ad95 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object3_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb index 0e5843d97a38..4c06f149f8ab 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object4_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb index 95cf79b2636e..adc7f7fbf1a3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object5_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb index 4f09b738b629..26b75fb14d16 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_object_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_object_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb index 2650716db768..0020490a5a2e 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/inline_response_default_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb index 36cbbc1e9ad2..712bc60fc975 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/list_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/list_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb index c659b037e70b..68af369edb6c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/map_test_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/map_test_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb index 4d8952aaa4eb..74682d5070f8 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb index a933d442d59a..17d81cd53e11 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/model200_response_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/model200_response_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb index 31eeabd78fa5..9955c485a22f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/model_return_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb index b0f8ba601297..8231e889df4a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/name_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb index bc94dd707c69..f66f12cd6755 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/nullable_class_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb index 86073d4404f0..5279dc3d1517 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/number_only_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/number_only_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb index d2249f7101c0..dc78d58c6295 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/order_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb index d5300f0a41f4..5d5867a960ef 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_composite_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb index 8f2bd69342d9..7eeed2cdeb1f 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_default_value_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb index 22dcb66fa006..3d294381a1e0 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_default_value_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb index eaadf5d8e560..c89576633534 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_integer_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb index 2085fde52fef..81489e56efb5 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/outer_enum_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb index 4df9e3fa819e..377ea72bdbaa 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/pet_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb index a380cd95dd16..85634671a39d 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/read_only_first_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb index 2aa1094cc2bb..d0ac24aa1b4a 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/special_model_name_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb index 0b05f6e4775d..01f21801e0f3 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/tag_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb index 6896fda990ff..999f4e0d087c 100644 --- a/samples/openapi3/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/openapi3/client/petstore/ruby/spec/models/user_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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb b/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb index 00fa66dac8ca..604b23f2d6f6 100644 --- a/samples/openapi3/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/openapi3/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: 4.3.0-SNAPSHOT -======= -OpenAPI Generator version: 4.2.2-SNAPSHOT ->>>>>>> origin/master =end diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 60e4bdf6f21d..bfbf77eb7fad 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 -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.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 60e4bdf6f21d..bfbf77eb7fad 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -4.3.0-SNAPSHOT -======= -4.2.2-SNAPSHOT ->>>>>>> origin/master +4.3.0-SNAPSHOT \ No newline at end of file From f6dbd48b9c5aadd50bdccacf87242f5c99cb5bc8 Mon Sep 17 00:00:00 2001 From: Pelle Stenild Coltau Date: Mon, 16 Dec 2019 10:40:53 +0100 Subject: [PATCH 04/72] [Swift4] Expanding CodableHelper with added date and JSON customisations (#3365) * Expanding CodableHelper with a more customisable dateFormatter and JSON en-/decoder. * Ran ./bin/swift4-petstore.sh * Ran ./bin/swift4-petstore-all.sh again after merge from master. * Ran ./bin/swift4-petstore-all.sh again after building. * Ran ./bin/swift4-petstore-all.sh again after rebase latest from upstream master. * sync master, update samples * Built and ran ./bin/swift4-petstore-all.sh * Re-adding code which disappeared in rebase from master. * Fixed test * [swift] remove old classes --- .../resources/swift4/CodableHelper.mustache | 74 +- .../main/resources/swift4/Extensions.mustache | 15 +- .../swift4/JSONEncodingHelper.mustache | 2 +- .../src/main/resources/swift4/model.mustache | 1 - .../resources/swift4/modelObject.mustache | 4 +- .../scala-akka/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/ApiInvoker.scala | 2 +- .../org/openapitools/client/api/PetApi.scala | 53 +- .../openapitools/client/api/StoreApi.scala | 29 +- .../org/openapitools/client/api/UserApi.scala | 53 +- .../client/model/ApiResponse.scala | 2 +- .../openapitools/client/model/Category.scala | 2 +- .../org/openapitools/client/model/Order.scala | 2 +- .../org/openapitools/client/model/Pet.scala | 2 +- .../org/openapitools/client/model/Tag.scala | 2 +- .../org/openapitools/client/model/User.scala | 2 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 - .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 - .../DataStructures/InfiniteSequence.swift | 8 +- .../Platform/DataStructures/Queue.swift | 36 +- .../Pods/RxSwift/RxSwift/Cancelable.swift | 2 +- .../SynchronizedUnsubscribeType.swift | 2 +- .../RxSwift/ConnectableObservableType.swift | 2 +- .../RxSwift/Disposables/Disposables.swift | 1 - .../RxSwift/Disposables/NopDisposable.swift | 10 +- .../Pods/RxSwift/RxSwift/Errors.swift | 4 +- .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 6 +- .../Schedulers/HistoricalScheduler.swift | 2 +- .../Internal/ScheduledItemType.swift | 4 +- .../RxSwift/Subjects/SubjectType.swift | 6 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../petstore/swift4/default/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 70 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 56 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 28 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 48 +- .../OpenAPIs/AlamofireImplementations.swift | 29 +- .../Classes/OpenAPIs/CodableHelper.swift | 78 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 35 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 1 + .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 1 + .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 1 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 1 + .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 1 + .../Pods/Alamofire/Source/Alamofire.swift | 456 +++++++++ .../Alamofire/Source/MultipartFormData.swift | 578 ++++++++++++ .../Source/NetworkReachabilityManager.swift | 236 +++++ .../Alamofire/Source/ParameterEncoding.swift | 482 ++++++++++ .../Pods/Alamofire/Source/Request.swift | 658 +++++++++++++ .../Pods/Alamofire/Source/Response.swift | 563 +++++++++++ .../Source/ResponseSerialization.swift | 697 ++++++++++++++ .../Alamofire/Source/ServerTrustPolicy.swift | 306 ++++++ .../Alamofire/Source/SessionDelegate.swift | 713 ++++++++++++++ .../Alamofire/Source/SessionManager.swift | 886 ++++++++++++++++++ .../Pods/Alamofire/Source/TaskDelegate.swift | 456 +++++++++ .../Pods/Alamofire/Source/Timeline.swift | 135 +++ .../Pods/Alamofire/Source/Validation.swift | 319 +++++++ .../SwaggerClientTests/DateFormatTests.swift | 4 +- .../nonPublicApi/.openapi-generator/VERSION | 2 +- .../swift4/nonPublicApi/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 15 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 108 +-- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 74 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 28 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 50 +- .../OpenAPIs/AlamofireImplementations.swift | 45 +- .../Classes/OpenAPIs/CodableHelper.swift | 80 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 43 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 1 + .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 1 + .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 1 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 1 + .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 1 + .../objcCompatible/.openapi-generator/VERSION | 2 +- .../swift4/objcCompatible/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 70 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 56 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 28 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 48 +- .../OpenAPIs/AlamofireImplementations.swift | 29 +- .../Classes/OpenAPIs/CodableHelper.swift | 80 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 35 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 3 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 3 +- .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 3 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 3 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 3 +- .../.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 58 +- .../APIs/FakeClassnameTags123API.swift | 2 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 46 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 24 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../OpenAPIs/AlamofireImplementations.swift | 29 +- .../Classes/OpenAPIs/CodableHelper.swift | 80 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 35 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 1 + .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 1 + .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 1 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 1 + .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 1 + .../resultLibrary/.openapi-generator/VERSION | 2 +- .../contents.xcworkspacedata | 7 - .../swift4/resultLibrary/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 15 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 124 +-- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 82 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 32 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 62 +- .../OpenAPIs/AlamofireImplementations.swift | 45 +- .../Classes/OpenAPIs/CodableHelper.swift | 80 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 43 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 1 + .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 1 + .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 1 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 1 + .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 1 + .../rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../swift4/rxswiftLibrary/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 48 +- .../APIs/FakeClassnameTags123API.swift | 2 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 38 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 22 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 32 +- .../OpenAPIs/AlamofireImplementations.swift | 29 +- .../Classes/OpenAPIs/CodableHelper.swift | 80 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 35 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 1 + .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 1 + .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 1 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 1 + .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 1 + .../unwrapRequired/.openapi-generator/VERSION | 2 +- .../swift4/unwrapRequired/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 70 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 56 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 28 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 48 +- .../OpenAPIs/AlamofireImplementations.swift | 29 +- .../Classes/OpenAPIs/CodableHelper.swift | 80 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 35 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 10 +- .../Classes/OpenAPIs/Models.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 9 +- .../Classes/OpenAPIs/Models/Animal.swift | 1 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 1 + .../Models/ArrayOfArrayOfNumberOnly.swift | 3 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 3 +- .../OpenAPIs/Models/Capitalization.swift | 3 +- .../Classes/OpenAPIs/Models/Cat.swift | 1 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 1 + .../Classes/OpenAPIs/Models/Category.swift | 1 + .../Classes/OpenAPIs/Models/ClassModel.swift | 1 - .../Classes/OpenAPIs/Models/Client.swift | 1 + .../Classes/OpenAPIs/Models/Dog.swift | 1 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 1 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 3 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 3 +- .../Classes/OpenAPIs/Models/File.swift | 1 - .../OpenAPIs/Models/FileSchemaTestClass.swift | 1 + .../Classes/OpenAPIs/Models/FormatTest.swift | 1 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 1 + .../Classes/OpenAPIs/Models/List.swift | 3 +- .../Classes/OpenAPIs/Models/MapTest.swift | 11 +- ...opertiesAndAdditionalPropertiesClass.swift | 5 +- .../OpenAPIs/Models/Model200Response.swift | 3 +- .../Classes/OpenAPIs/Models/Name.swift | 3 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 3 +- .../Classes/OpenAPIs/Models/Order.swift | 1 + .../OpenAPIs/Models/OuterComposite.swift | 3 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 1 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 1 + .../Classes/OpenAPIs/Models/Return.swift | 3 +- .../OpenAPIs/Models/SpecialModelName.swift | 3 +- .../OpenAPIs/Models/StringBooleanMap.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 1 + .../OpenAPIs/Models/TypeHolderDefault.swift | 3 +- .../OpenAPIs/Models/TypeHolderExample.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 1 + .../Classes/OpenAPIs/APIs/Swift4TestAPI.swift | 2 +- .../Classes/OpenAPIs/CodableHelper.swift | 72 +- .../Classes/OpenAPIs/Extensions.swift | 23 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../petstore/avro/.openapi-generator/VERSION | 2 +- .../aspnetcore/.openapi-generator/VERSION | 2 +- 449 files changed, 8723 insertions(+), 1885 deletions(-) create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift create mode 100644 samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift delete mode 100644 samples/client/petstore/swift4/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata diff --git a/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache index b0db903483bd..b8d29582b2ec 100644 --- a/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/CodableHelper.mustache @@ -11,27 +11,48 @@ import Foundation {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class CodableHelper { - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateformatter: DateFormatter? + 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 - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } - do { - returnedDecodable = try decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ import Foundation return (returnedDecodable, returnedError) } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? var returnedError: Error? = nil - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } - do { - returnedData = try encoder.encode(value) + 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/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache index 0fb2e44a4a36..fa2c51d49643 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache @@ -69,22 +69,9 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter - } -}() - extension Date: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return CodableHelper.dateFormatter.string(from: self) as Any } } diff --git a/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache index d4d7cc8f7500..4e7492a71e1d 100644 --- a/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache @@ -15,7 +15,7 @@ import Alamofire // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } diff --git a/modules/openapi-generator/src/main/resources/swift4/model.mustache b/modules/openapi-generator/src/main/resources/swift4/model.mustache index 806cc969b545..6534ca945f69 100644 --- a/modules/openapi-generator/src/main/resources/swift4/model.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/model.mustache @@ -8,7 +8,6 @@ import Foundation {{#description}} - /** {{description}} */{{/description}} {{#isArrayModel}} {{> modelArray}} diff --git a/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache index 54ad96db65fd..806086efc80f 100644 --- a/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache @@ -1,4 +1,3 @@ - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable { {{#allVars}} @@ -78,5 +77,4 @@ 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/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/ApiInvoker.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/ApiInvoker.scala index 885c71199db3..0b17519c6f92 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/ApiInvoker.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/ApiInvoker.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/PetApi.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/PetApi.scala index 191e9f9fa4b8..768cb5c0b5f3 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/PetApi.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/PetApi.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,12 +25,13 @@ import com.sun.jersey.multipart.file.FileDataBodyPart import com.wordnik.swagger.client._ import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ +import javax.ws.rs.core.Response.Status.Family import java.net.URI import java.io.File import java.util.Date import java.util.TimeZone -import javax.ws.rs.core.MediaType +import javax.ws.rs.core.{MediaType, Response} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ @@ -309,7 +310,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -331,7 +336,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -348,7 +357,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -365,7 +378,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -381,7 +398,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -397,7 +418,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -416,7 +441,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -435,7 +464,11 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala index ed574a0eac71..4328080db938 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,12 +23,13 @@ import com.sun.jersey.multipart.file.FileDataBodyPart import com.wordnik.swagger.client._ import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ +import javax.ws.rs.core.Response.Status.Family import java.net.URI import java.io.File import java.util.Date import java.util.TimeZone -import javax.ws.rs.core.MediaType +import javax.ws.rs.core.{MediaType, Response} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ @@ -193,7 +194,11 @@ class StoreApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extend val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -208,7 +213,11 @@ class StoreApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extend val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -224,7 +233,11 @@ class StoreApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extend val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -240,7 +253,11 @@ class StoreApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extend val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/UserApi.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/UserApi.scala index 141e7a18dd8b..efd7f1ef97fa 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/UserApi.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/UserApi.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,12 +23,13 @@ import com.sun.jersey.multipart.file.FileDataBodyPart import com.wordnik.swagger.client._ import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ +import javax.ws.rs.core.Response.Status.Family import java.net.URI import java.io.File import java.util.Date import java.util.TimeZone -import javax.ws.rs.core.MediaType +import javax.ws.rs.core.{MediaType, Response} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ @@ -299,7 +300,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -315,7 +320,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -331,7 +340,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -349,7 +362,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -367,7 +384,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -389,7 +410,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -404,7 +429,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } @@ -424,7 +453,11 @@ class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body)) resFuture flatMap { resp => - process(reader.read(resp)) + val status = Response.Status.fromStatusCode(resp.statusCode) + status.getFamily match { + case Family.SUCCESSFUL | Family.REDIRECTION | Family.INFORMATIONAL => process(reader.read(resp)) + case _ => throw new ApiException(resp.statusCode, resp.statusText) + } } } diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/ApiResponse.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/ApiResponse.scala index 090cbaddd4b4..be7412313294 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/ApiResponse.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/ApiResponse.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Category.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Category.scala index 5040e0cb96f1..be3307b8f8ee 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Category.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Category.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Order.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Order.scala index 72f09d7a74ee..d0ca63b5091f 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Order.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Order.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Pet.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Pet.scala index 1f060b10c7fb..2de76ae35888 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Pet.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Pet.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Tag.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Tag.scala index da3cd4acd441..6fbabf7ed630 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Tag.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/Tag.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/User.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/User.scala index cd4c1c9b6702..fc24b101e8ba 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/User.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/model/User.scala @@ -2,7 +2,7 @@ * 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. * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e7bea63f8ed2..e09b0e9efdc8 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,5 +7,4 @@ import Foundation - public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift3/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift3/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e7bea63f8ed2..e09b0e9efdc8 100644 --- a/samples/client/petstore/swift3/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift3/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,5 +7,4 @@ import Foundation - public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift index 5a573a0de168..1307febd8ec8 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift @@ -7,16 +7,16 @@ // /// Sequence that repeats `repeatedValue` infinite number of times. -struct InfiniteSequence : Sequence { +struct InfiniteSequence: Sequence { typealias Element = E typealias Iterator = AnyIterator - + private let _repeatedValue: E - + init(repeatedValue: E) { _repeatedValue = repeatedValue } - + func makeIterator() -> Iterator { let repeatedValue = _repeatedValue return AnyIterator { diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift index d05726c7b99a..b9b3ae2e8b89 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift @@ -19,7 +19,7 @@ struct Queue: Sequence { typealias Generator = AnyIterator private let _resizeFactor = 2 - + private var _storage: ContiguousArray private var _count = 0 private var _pushNextIndex = 0 @@ -35,50 +35,50 @@ struct Queue: Sequence { _storage = ContiguousArray(repeating: nil, count: capacity) } - + private var dequeueIndex: Int { let index = _pushNextIndex - count return index < 0 ? index + _storage.count : index } - + /// - returns: Is queue empty. var isEmpty: Bool { return count == 0 } - + /// - returns: Number of elements inside queue. var count: Int { return _count } - + /// - returns: Element in front of a list of elements to `dequeue`. func peek() -> T { precondition(count > 0) - + return _storage[dequeueIndex]! } - + mutating private func resizeTo(_ size: Int) { var newStorage = ContiguousArray(repeating: nil, count: size) - + let count = _count - + let dequeueIndex = self.dequeueIndex let spaceToEndOfQueue = _storage.count - dequeueIndex - + // first batch is from dequeue index to end of array let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) // second batch is wrapped from start of array to end of queue let numberOfElementsInSecondBatch = count - countElementsInFirstBatch - + newStorage[0 ..< countElementsInFirstBatch] = _storage[dequeueIndex ..< (dequeueIndex + countElementsInFirstBatch)] newStorage[countElementsInFirstBatch ..< (countElementsInFirstBatch + numberOfElementsInSecondBatch)] = _storage[0 ..< numberOfElementsInSecondBatch] - + _count = count _pushNextIndex = count _storage = newStorage } - + /// Enqueues `element`. /// /// - parameter element: Element to enqueue. @@ -86,19 +86,19 @@ struct Queue: Sequence { if count == _storage.count { resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) } - + _storage[_pushNextIndex] = element _pushNextIndex += 1 _count += 1 - + if _pushNextIndex >= _storage.count { _pushNextIndex -= _storage.count } } - + private mutating func dequeueElementOnly() -> T { precondition(count > 0) - + let index = dequeueIndex defer { @@ -126,7 +126,7 @@ struct Queue: Sequence { return dequeueElementOnly() } - + /// - returns: Generator of contained elements. func makeIterator() -> AnyIterator { var i = dequeueIndex diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift index 1fa7a67726e5..341807c18cba 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift @@ -7,7 +7,7 @@ // /// Represents disposable resource with state tracking. -public protocol Cancelable : Disposable { +public protocol Cancelable: Disposable { /// Was resource disposed. var isDisposed: Bool { get } } diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift index bb1aa7e47df2..29897d4bdb8e 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol SynchronizedUnsubscribeType : class { +protocol SynchronizedUnsubscribeType: class { associatedtype DisposeKey func synchronizedUnsubscribe(_ disposeKey: DisposeKey) diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift index 52bf93c56862..239455a0f960 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift @@ -9,7 +9,7 @@ /** Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. */ -public protocol ConnectableObservableType : ObservableType { +public protocol ConnectableObservableType: ObservableType { /** Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift index 8cd6e28c3c90..fbee0bc5b8ed 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift @@ -10,4 +10,3 @@ public struct Disposables { private init() {} } - diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift index 149f86643425..24fb5acc61f0 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift @@ -9,14 +9,14 @@ /// Represents a disposable that does nothing on disposal. /// /// Nop = No Operation -fileprivate struct NopDisposable : Disposable { - +private struct NopDisposable: Disposable { + fileprivate static let noOp: Disposable = NopDisposable() - + fileprivate init() { - + } - + /// Does nothing. public func dispose() { } diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift index f17b52d882a8..648918e16fec 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift @@ -10,9 +10,7 @@ let RxErrorDomain = "RxErrorDomain" let RxCompositeFailures = "RxCompositeFailures" /// Generic Rx error codes. -public enum RxError - : Swift.Error - , CustomDebugStringConvertible { +public enum RxError: Swift.Error, CustomDebugStringConvertible { /// Unknown error occurred. case unknown /// Performing an action on disposed object. diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift index 7f3c333baa65..55302ea2e5d6 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift @@ -7,10 +7,10 @@ // /// Creates mutable reference wrapper for any type. -final class RxMutableBox : CustomDebugStringConvertible { +final class RxMutableBox: CustomDebugStringConvertible { /// Wrapped value - var value : T - + var value: T + /// Creates reference wrapper for `value`. /// /// - parameter value: Value to wrap. diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift index 11af238a3b1f..8f76a1407be2 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift @@ -9,7 +9,7 @@ import struct Foundation.Date /// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. -public class HistoricalScheduler : VirtualTimeScheduler { +public class HistoricalScheduler: VirtualTimeScheduler { /** Creates a new historical scheduler with initial clock value. diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift index d2b16cab7007..ec05efda6297 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift @@ -6,8 +6,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol ScheduledItemType - : Cancelable - , InvocableType { +protocol ScheduledItemType: Cancelable, InvocableType { func invoke() } diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift index 0fc0d03592b1..6fb3b6ec630b 100644 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift @@ -7,15 +7,15 @@ // /// Represents an object that is both an observable sequence as well as an observer. -public protocol SubjectType : ObservableType { +public protocol SubjectType: ObservableType { /// The type of the observer that represents this subject. /// /// Usually this type is type of subject itself, but it doesn't have to be. - associatedtype SubjectObserverType : ObserverType + associatedtype SubjectObserverType: ObserverType /// Returns observer interface for subject. /// /// - returns: Observer interface for subject. func asObserver() -> SubjectObserverType - + } diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/Package.swift b/samples/client/petstore/swift4/default/Package.swift index e5c5f0f33b82..a847bc5077d1 100644 --- a/samples/client/petstore/swift4/default/Package.swift +++ b/samples/client/petstore/swift4/default/Package.swift @@ -9,11 +9,11 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -22,6 +22,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["Alamofire"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 200070096800..d94614b34fc7 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift index 832282d224f8..13586cdadd87 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,23 +9,23 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -35,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -58,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 02e24286e3c8..1e6b7fc02c2c 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -14,7 +16,7 @@ open class AnotherFakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b0b394aa06e0..0bdeee0b2cb6 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,13 +7,15 @@ import Foundation + + open class FakeAPI { /** - parameter body: (body) Input boolean as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -42,7 +44,7 @@ open class FakeAPI { - parameter body: (body) Input composite as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -71,7 +73,7 @@ open class FakeAPI { - parameter body: (body) Input number as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -100,7 +102,7 @@ open class FakeAPI { - parameter body: (body) Input string as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -129,8 +131,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -163,8 +165,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -200,7 +202,7 @@ open class FakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -244,8 +246,8 @@ open class FakeAPI { - parameter callback: (form) None (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -280,7 +282,7 @@ open class FakeAPI { open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -299,7 +301,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -387,8 +389,8 @@ open class FakeAPI { - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -414,19 +416,19 @@ open class FakeAPI { open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "enum_form_string_array": enumFormStringArray?.encodeToJSON(), "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -451,8 +453,8 @@ open class FakeAPI { - parameter int64Group: (query) Integer in group parameters (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -476,13 +478,13 @@ open class FakeAPI { open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -502,8 +504,8 @@ open class FakeAPI { - parameter param: (body) request body - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -518,7 +520,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -537,8 +539,8 @@ open class FakeAPI { - parameter param2: (form) field2 - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -557,14 +559,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "param": param.encodeToJSON(), "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 060d434fbf24..822a371cef34 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -14,7 +16,7 @@ open class FakeClassnameTags123API { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index fe75962a72cf..cc4397947d1d 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -14,8 +16,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func addPet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -52,8 +54,8 @@ open class PetAPI { - parameter apiKey: (header) (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -78,8 +80,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -106,7 +108,7 @@ open class PetAPI { - parameter status: (query) Status values that need to be considered for filter - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in completion(response?.body, error) } @@ -125,8 +127,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -143,7 +145,7 @@ open class PetAPI { - parameter tags: (query) Tags to filter by - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in completion(response?.body, error) } @@ -162,8 +164,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -180,7 +182,7 @@ open class PetAPI { - parameter petId: (path) ID of pet to return - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -202,8 +204,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -217,8 +219,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -256,8 +258,8 @@ open class PetAPI { - parameter status: (form) Updated status of the pet (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -283,14 +285,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "name": name?.encodeToJSON(), "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -306,7 +308,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in completion(response?.body, error) } @@ -329,14 +331,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -352,7 +354,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in completion(response?.body, error) } @@ -375,14 +377,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index d5f627df52ac..b62f18f3f020 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -14,8 +16,8 @@ open class StoreAPI { - parameter orderId: (path) ID of the order that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -37,8 +39,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -51,7 +53,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in completion(response?.body, error) } @@ -66,14 +68,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -84,7 +86,7 @@ open class StoreAPI { - parameter orderId: (path) ID of pet that needs to be fetched - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -103,8 +105,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -118,7 +120,7 @@ open class StoreAPI { - parameter body: (body) order placed for purchasing the pet - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index ef4f971a91e2..0e2d140e037d 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -14,8 +16,8 @@ open class UserAPI { - parameter body: (body) Created user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUser(body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -49,8 +51,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -83,8 +85,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -117,8 +119,8 @@ open class UserAPI { - parameter username: (path) The name that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + open class func deleteUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -140,8 +142,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -155,7 +157,7 @@ open class UserAPI { - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in completion(response?.body, error) } @@ -173,8 +175,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -189,7 +191,7 @@ open class UserAPI { - parameter password: (query) The password for login in clear text - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in completion(response?.body, error) } @@ -206,11 +208,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -224,8 +226,8 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + open class func logoutUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -242,8 +244,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -258,8 +260,8 @@ open class UserAPI { - parameter body: (body) Updated user object - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 1d54e695608b..f8521a9c036e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ open class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -275,7 +276,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ public enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -435,7 +436,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..fdbe7f72017a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + 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 + }() - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + open 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift index e1ecb39726e7..516590da5d9e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation open class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index f8faed255bf0..1f948ae12f78 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -68,22 +68,9 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter - } -}() - extension Date: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return CodableHelper.dateFormatter.string(from: self) as Any } } @@ -121,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -148,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -160,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -170,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -184,3 +171,5 @@ extension KeyedDecodingContainerProtocol { } } + + diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index fb76bbed26f7..ca05906d4206 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ public struct JSONDataEncoding: ParameterEncoding { } public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..6ae673e1f8ca 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift index 25161165865e..408563890359 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 83a06951ccd6..e9c0e5a143d6 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? + public var mapString: [String:String]? + public var mapMapString: [String:[String:String]]? - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a36..46d4828ceb62 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + public struct Animal: Codable { public var className: String diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efdc8..e7bea63f8ed2 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da89074..781d0feae1bf 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + public struct ApiResponse: Codable { public var code: Int? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 3843287630b1..ddf52a557ba9 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index f8b198e81f50..c5c237ef5813 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? @@ -15,7 +16,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 67f7f7e5151f..c88a3a190ede 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayTest: Codable { public var arrayOfString: [String]? @@ -19,7 +20,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d576b50b1c9c..b2487f3ebde0 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + public struct Capitalization: Codable { public var smallCamel: String? @@ -26,7 +27,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f3113f..087b65ef0443 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + public struct Cat: Codable { public var className: String diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffab1..b50c502feef7 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct CatAllOf: Codable { public var declawed: Bool? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e1974..bcd0a62e0108 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + public struct Category: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 28cb30ce7b4b..e2a7d4427a06 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - public struct ClassModel: Codable { public var _class: String? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca37280..8d2e27738257 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + public struct Client: Codable { public var client: String? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c1228008e..ed63186cc453 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + public struct Dog: Codable { public var className: String diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5ae..5b07a846597c 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct DogAllOf: Codable { public var breed: String? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 5034ff0b8c68..428c480ea514 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 3c1dfcac577d..7280a621fec7 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 6db9b34d183b..74ec3850fb2e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumTest: Codable { public enum EnumString: String, Codable { @@ -41,7 +42,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift index ea3520f053dd..abf3ccffc485 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - public struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f1457939a..bc6db3d9d760 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + public struct FileSchemaTestClass: Codable { public var file: File? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b3d..260526eb804b 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct FormatTest: Codable { public var integer: Int? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb17..c8ee22c8b10a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct HasOnlyReadOnly: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 08d59953873e..fcf96a59c070 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + public struct List: Codable { public var _123list: String? @@ -15,7 +16,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 3a10a7dfcaf6..6807459a2aa1 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + public var mapMapOfString: [String:[String:String]]? + public var mapOfEnumString: [String:String]? + public var directMap: [String:Bool]? public var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f28932..ee0bc70f2c48 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7ed6aad907be..05b7e7231ca2 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - public struct Model200Response: Codable { public var name: Int? @@ -19,7 +18,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index ce9ffe4fb38e..06d5ac3c87b1 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - public struct Name: Codable { public var name: Int @@ -23,7 +22,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index abd2269e8e76..f61554861ab9 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct NumberOnly: Codable { public var justNumber: Double? @@ -15,7 +16,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index a6e1b1d2e5e4..d38c8953f0f6 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + public struct Order: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 49aec001c5db..5ef0caccc9ff 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + public struct OuterComposite: Codable { public var myNumber: Double? @@ -19,7 +20,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index 9f80fc95ecf0..bd1643d279ed 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index af60a550bb19..e943c40a8c48 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + public struct Pet: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd1000..d0262dec8cea 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + public struct ReadOnlyFirst: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 076082af842f..18046e969339 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - public struct Return: Codable { public var _return: Int? @@ -17,7 +16,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index e79fc45c0e91..c52be66ea645 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + public struct SpecialModelName: Codable { public var specialPropertyName: Int64? @@ -15,7 +16,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee477..ffb79addebbb 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5a0..8277746be90e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + public struct Tag: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index bf0006e1a266..b936721e454d 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderDefault: Codable { public var stringItem: String = "what" @@ -23,7 +24,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 602a2a6d185a..d7bf3f5b13ee 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderExample: Codable { public var stringItem: String @@ -23,7 +24,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed7356..d71e55e3c195 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + public struct User: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift new file mode 100644 index 000000000000..036e1df7cd50 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift @@ -0,0 +1,456 @@ +// +// Alamofire.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct +/// URL requests. +public protocol URLConvertible { + /// Returns a URL that conforms to RFC 2396 or throws an `Error`. + /// + /// - throws: An `Error` if the type cannot be converted to a `URL`. + /// + /// - returns: A URL or throws an `Error`. + func asURL() throws -> URL +} + +extension String: URLConvertible { + /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. + /// + /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. + /// + /// - returns: A URL or throws an `AFError`. + public func asURL() throws -> URL { + guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } + return url + } +} + +extension URL: URLConvertible { + /// Returns self. + public func asURL() throws -> URL { return self } +} + +extension URLComponents: URLConvertible { + /// Returns a URL if `url` is not nil, otherwise throws an `Error`. + /// + /// - throws: An `AFError.invalidURL` if `url` is `nil`. + /// + /// - returns: A URL or throws an `AFError`. + public func asURL() throws -> URL { + guard let url = url else { throw AFError.invalidURL(url: self) } + return url + } +} + +// MARK: - + +/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. +public protocol URLRequestConvertible { + /// Returns a URL request or throws if an `Error` was encountered. + /// + /// - throws: An `Error` if the underlying `URLRequest` is `nil`. + /// + /// - returns: A URL request. + func asURLRequest() throws -> URLRequest +} + +extension URLRequestConvertible { + /// The URL request. + public var urlRequest: URLRequest? { return try? asURLRequest() } +} + +extension URLRequest: URLRequestConvertible { + /// Returns a URL request or throws if an `Error` was encountered. + public func asURLRequest() throws -> URLRequest { return self } +} + +// MARK: - + +extension URLRequest { + /// Creates an instance with the specified `method`, `urlString` and `headers`. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The new `URLRequest` instance. + public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { + let url = try url.asURL() + + self.init(url: url) + + httpMethod = method.rawValue + + if let headers = headers { + for (headerField, headerValue) in headers { + setValue(headerValue, forHTTPHeaderField: headerField) + } + } + } + + func adapt(using adapter: RequestAdapter?) throws -> URLRequest { + guard let adapter = adapter else { return self } + return try adapter.adapt(self) + } +} + +// MARK: - Data Request + +/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, +/// `method`, `parameters`, `encoding` and `headers`. +/// +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.get` by default. +/// - parameter parameters: The parameters. `nil` by default. +/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `DataRequest`. +@discardableResult +public func request( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil) + -> DataRequest { + return SessionManager.default.request( + url, + method: method, + parameters: parameters, + encoding: encoding, + headers: headers + ) +} + +/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the +/// specified `urlRequest`. +/// +/// - parameter urlRequest: The URL request +/// +/// - returns: The created `DataRequest`. +@discardableResult +public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + return SessionManager.default.request(urlRequest) +} + +// MARK: - Download Request + +// MARK: URL Request + +/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, +/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.get` by default. +/// - parameter parameters: The parameters. `nil` by default. +/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest { + return SessionManager.default.download( + url, + method: method, + parameters: parameters, + encoding: encoding, + headers: headers, + to: destination + ) +} + +/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the +/// specified `urlRequest` and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter urlRequest: The URL request. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + _ urlRequest: URLRequestConvertible, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest { + return SessionManager.default.download(urlRequest, to: destination) +} + +// MARK: Resume Data + +/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a +/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken +/// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the +/// data is written incorrectly and will always fail to resume the download. For more information about the bug and +/// possible workarounds, please refer to the following Stack Overflow post: +/// +/// - http://stackoverflow.com/a/39347461/1342462 +/// +/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` +/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional +/// information. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + resumingWith resumeData: Data, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest { + return SessionManager.default.download(resumingWith: resumeData, to: destination) +} + +// MARK: - Upload Request + +// MARK: File + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `file`. +/// +/// - parameter file: The file to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload( + _ fileURL: URL, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { + return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) +} + +/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `file`. +/// +/// - parameter file: The file to upload. +/// - parameter urlRequest: The URL request. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(fileURL, with: urlRequest) +} + +// MARK: Data + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `data`. +/// +/// - parameter data: The data to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload( + _ data: Data, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { + return SessionManager.default.upload(data, to: url, method: method, headers: headers) +} + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `data`. +/// +/// - parameter data: The data to upload. +/// - parameter urlRequest: The URL request. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(data, with: urlRequest) +} + +// MARK: InputStream + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `stream`. +/// +/// - parameter stream: The stream to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload( + _ stream: InputStream, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { + return SessionManager.default.upload(stream, to: url, method: method, headers: headers) +} + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `stream`. +/// +/// - parameter urlRequest: The URL request. +/// - parameter stream: The stream to upload. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(stream, with: urlRequest) +} + +// MARK: MultipartFormData + +/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls +/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. +/// +/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative +/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +/// used for larger payloads such as video content. +/// +/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory +/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, +/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +/// technique was used. +/// +/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. +/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. +/// `multipartFormDataEncodingMemoryThreshold` by default. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. +public func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { + return SessionManager.default.upload( + multipartFormData: multipartFormData, + usingThreshold: encodingMemoryThreshold, + to: url, + method: method, + headers: headers, + encodingCompletion: encodingCompletion + ) +} + +/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and +/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. +/// +/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative +/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +/// used for larger payloads such as video content. +/// +/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory +/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, +/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +/// technique was used. +/// +/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. +/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. +/// `multipartFormDataEncodingMemoryThreshold` by default. +/// - parameter urlRequest: The URL request. +/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. +public func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + with urlRequest: URLRequestConvertible, + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { + return SessionManager.default.upload( + multipartFormData: multipartFormData, + usingThreshold: encodingMemoryThreshold, + with: urlRequest, + encodingCompletion: encodingCompletion + ) +} + +#if !os(watchOS) + +// MARK: - Stream Request + +// MARK: Hostname and Port + +/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` +/// and `port`. +/// +/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +/// +/// - parameter hostName: The hostname of the server to connect to. +/// - parameter port: The port of the server to connect to. +/// +/// - returns: The created `StreamRequest`. +@discardableResult +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) +public func stream(withHostName hostName: String, port: Int) -> StreamRequest { + return SessionManager.default.stream(withHostName: hostName, port: port) +} + +// MARK: NetService + +/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. +/// +/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +/// +/// - parameter netService: The net service used to identify the endpoint. +/// +/// - returns: The created `StreamRequest`. +@discardableResult +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) +public func stream(with netService: NetService) -> StreamRequest { + return SessionManager.default.stream(with: netService) +} + +#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift new file mode 100644 index 000000000000..7df468a011c8 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift @@ -0,0 +1,578 @@ +// +// MultipartFormData.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +#if os(iOS) || os(watchOS) || os(tvOS) +import MobileCoreServices +#elseif os(macOS) +import CoreServices +#endif + +/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode +/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. +/// +/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well +/// and the w3 form documentation. +/// +/// - https://www.ietf.org/rfc/rfc2388.txt +/// - https://www.ietf.org/rfc/rfc2045.txt +/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 +open class MultipartFormData { + + // MARK: - Helper Types + + struct EncodingCharacters { + static let crlf = "\r\n" + } + + struct BoundaryGenerator { + enum BoundaryType { + case initial, encapsulated, final + } + + static func randomBoundary() -> String { + return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) + } + + static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { + let boundaryText: String + + switch boundaryType { + case .initial: + boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" + case .encapsulated: + boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" + case .final: + boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" + } + + return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! + } + } + + class BodyPart { + let headers: HTTPHeaders + let bodyStream: InputStream + let bodyContentLength: UInt64 + var hasInitialBoundary = false + var hasFinalBoundary = false + + init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { + self.headers = headers + self.bodyStream = bodyStream + self.bodyContentLength = bodyContentLength + } + } + + // MARK: - Properties + + /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. + open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" + + /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. + public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } + + /// The boundary used to separate the body parts in the encoded form data. + public var boundary: String + + private var bodyParts: [BodyPart] + private var bodyPartError: AFError? + private let streamBufferSize: Int + + // MARK: - Lifecycle + + /// Creates a multipart form data object. + /// + /// - returns: The multipart form data object. + public init() { + self.boundary = BoundaryGenerator.randomBoundary() + self.bodyParts = [] + + /// + /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more + /// information, please refer to the following article: + /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html + /// + + self.streamBufferSize = 1024 + } + + // MARK: - Body Parts + + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + /// - Encoded data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + public func append(_ data: Data, withName name: String) { + let headers = contentHeaders(withName: name) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) + } + + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + /// - `Content-Type: #{generated mimeType}` (HTTP Header) + /// - Encoded data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, mimeType: String) { + let headers = contentHeaders(withName: name, mimeType: mimeType) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) + } + + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + /// - `Content-Type: #{mimeType}` (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) + } + + /// Creates a body part from the file and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) + /// - `Content-Type: #{generated mimeType}` (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the + /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the + /// system associated MIME type. + /// + /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + public func append(_ fileURL: URL, withName name: String) { + let fileName = fileURL.lastPathComponent + let pathExtension = fileURL.pathExtension + + if !fileName.isEmpty && !pathExtension.isEmpty { + let mime = mimeType(forPathExtension: pathExtension) + append(fileURL, withName: name, fileName: fileName, mimeType: mime) + } else { + setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) + } + } + + /// Creates a body part from the file and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) + /// - Content-Type: #{mimeType} (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. + public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + + //============================================================ + // Check 1 - is file URL? + //============================================================ + + guard fileURL.isFileURL else { + setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) + return + } + + //============================================================ + // Check 2 - is file URL reachable? + //============================================================ + + do { + let isReachable = try fileURL.checkPromisedItemIsReachable() + guard isReachable else { + setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) + return + } + } catch { + setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) + return + } + + //============================================================ + // Check 3 - is file URL a directory? + //============================================================ + + var isDirectory: ObjCBool = false + let path = fileURL.path + + guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { + setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) + return + } + + //============================================================ + // Check 4 - can the file size be extracted? + //============================================================ + + let bodyContentLength: UInt64 + + do { + guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { + setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) + return + } + + bodyContentLength = fileSize.uint64Value + } catch { + setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) + return + } + + //============================================================ + // Check 5 - can a stream be created from file URL? + //============================================================ + + guard let stream = InputStream(url: fileURL) else { + setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) + return + } + + append(stream, withLength: bodyContentLength, headers: headers) + } + + /// Creates a body part from the stream and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + /// - `Content-Type: #{mimeType}` (HTTP Header) + /// - Encoded stream data + /// - Multipart form boundary + /// + /// - parameter stream: The input stream to encode in the multipart form data. + /// - parameter length: The content length of the stream. + /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. + public func append( + _ stream: InputStream, + withLength length: UInt64, + name: String, + fileName: String, + mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + append(stream, withLength: length, headers: headers) + } + + /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - HTTP headers + /// - Encoded stream data + /// - Multipart form boundary + /// + /// - parameter stream: The input stream to encode in the multipart form data. + /// - parameter length: The content length of the stream. + /// - parameter headers: The HTTP headers for the body part. + public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { + let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) + bodyParts.append(bodyPart) + } + + // MARK: - Data Encoding + + /// Encodes all the appended body parts into a single `Data` value. + /// + /// It is important to note that this method will load all the appended body parts into memory all at the same + /// time. This method should only be used when the encoded data will have a small memory footprint. For large data + /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. + /// + /// - throws: An `AFError` if encoding encounters an error. + /// + /// - returns: The encoded `Data` if encoding is successful. + public func encode() throws -> Data { + if let bodyPartError = bodyPartError { + throw bodyPartError + } + + var encoded = Data() + + bodyParts.first?.hasInitialBoundary = true + bodyParts.last?.hasFinalBoundary = true + + for bodyPart in bodyParts { + let encodedData = try encode(bodyPart) + encoded.append(encodedData) + } + + return encoded + } + + /// Writes the appended body parts into the given file URL. + /// + /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, + /// this approach is very memory efficient and should be used for large body part data. + /// + /// - parameter fileURL: The file URL to write the multipart form data into. + /// + /// - throws: An `AFError` if encoding encounters an error. + public func writeEncodedData(to fileURL: URL) throws { + if let bodyPartError = bodyPartError { + throw bodyPartError + } + + if FileManager.default.fileExists(atPath: fileURL.path) { + throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) + } else if !fileURL.isFileURL { + throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) + } + + guard let outputStream = OutputStream(url: fileURL, append: false) else { + throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) + } + + outputStream.open() + defer { outputStream.close() } + + self.bodyParts.first?.hasInitialBoundary = true + self.bodyParts.last?.hasFinalBoundary = true + + for bodyPart in self.bodyParts { + try write(bodyPart, to: outputStream) + } + } + + // MARK: - Private - Body Part Encoding + + private func encode(_ bodyPart: BodyPart) throws -> Data { + var encoded = Data() + + let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() + encoded.append(initialData) + + let headerData = encodeHeaders(for: bodyPart) + encoded.append(headerData) + + let bodyStreamData = try encodeBodyStream(for: bodyPart) + encoded.append(bodyStreamData) + + if bodyPart.hasFinalBoundary { + encoded.append(finalBoundaryData()) + } + + return encoded + } + + private func encodeHeaders(for bodyPart: BodyPart) -> Data { + var headerText = "" + + for (key, value) in bodyPart.headers { + headerText += "\(key): \(value)\(EncodingCharacters.crlf)" + } + headerText += EncodingCharacters.crlf + + return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! + } + + private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { + let inputStream = bodyPart.bodyStream + inputStream.open() + defer { inputStream.close() } + + var encoded = Data() + + while inputStream.hasBytesAvailable { + var buffer = [UInt8](repeating: 0, count: streamBufferSize) + let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) + + if let error = inputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) + } + + if bytesRead > 0 { + encoded.append(buffer, count: bytesRead) + } else { + break + } + } + + return encoded + } + + // MARK: - Private - Writing Body Part to Output Stream + + private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { + try writeInitialBoundaryData(for: bodyPart, to: outputStream) + try writeHeaderData(for: bodyPart, to: outputStream) + try writeBodyStream(for: bodyPart, to: outputStream) + try writeFinalBoundaryData(for: bodyPart, to: outputStream) + } + + private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { + let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() + return try write(initialData, to: outputStream) + } + + private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { + let headerData = encodeHeaders(for: bodyPart) + return try write(headerData, to: outputStream) + } + + private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { + let inputStream = bodyPart.bodyStream + + inputStream.open() + defer { inputStream.close() } + + while inputStream.hasBytesAvailable { + var buffer = [UInt8](repeating: 0, count: streamBufferSize) + let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) + + if let streamError = inputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) + } + + if bytesRead > 0 { + if buffer.count != bytesRead { + buffer = Array(buffer[0.. 0, outputStream.hasSpaceAvailable { + let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) + + if let error = outputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) + } + + bytesToWrite -= bytesWritten + + if bytesToWrite > 0 { + buffer = Array(buffer[bytesWritten.. String { + if + let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), + let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() + { + return contentType as String + } + + return "application/octet-stream" + } + + // MARK: - Private - Content Headers + + private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { + var disposition = "form-data; name=\"\(name)\"" + if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } + + var headers = ["Content-Disposition": disposition] + if let mimeType = mimeType { headers["Content-Type"] = mimeType } + + return headers + } + + // MARK: - Private - Boundary Encoding + + private func initialBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) + } + + private func encapsulatedBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) + } + + private func finalBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) + } + + // MARK: - Private - Errors + + private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { + guard bodyPartError == nil else { return } + bodyPartError = AFError.multipartEncodingFailed(reason: reason) + } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift new file mode 100644 index 000000000000..fa0647934f67 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -0,0 +1,236 @@ +// +// NetworkReachabilityManager.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#if !os(watchOS) + +import Foundation +import SystemConfiguration + +/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and +/// WiFi network interfaces. +/// +/// Reachability can be used to determine background information about why a network operation failed, or to retry +/// network requests when a connection is established. It should not be used to prevent a user from initiating a network +/// request, as it's possible that an initial request may be required to establish reachability. +open class NetworkReachabilityManager { + /// Defines the various states of network reachability. + /// + /// - unknown: It is unknown whether the network is reachable. + /// - notReachable: The network is not reachable. + /// - reachable: The network is reachable. + public enum NetworkReachabilityStatus { + case unknown + case notReachable + case reachable(ConnectionType) + } + + /// Defines the various connection types detected by reachability flags. + /// + /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. + /// - wwan: The connection type is a WWAN connection. + public enum ConnectionType { + case ethernetOrWiFi + case wwan + } + + /// A closure executed when the network reachability status changes. The closure takes a single argument: the + /// network reachability status. + public typealias Listener = (NetworkReachabilityStatus) -> Void + + // MARK: - Properties + + /// Whether the network is currently reachable. + open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + + /// Whether the network is currently reachable over the WWAN interface. + open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } + + /// Whether the network is currently reachable over Ethernet or WiFi interface. + open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } + + /// The current network reachability status. + open var networkReachabilityStatus: NetworkReachabilityStatus { + guard let flags = self.flags else { return .unknown } + return networkReachabilityStatusForFlags(flags) + } + + /// The dispatch queue to execute the `listener` closure on. + open var listenerQueue: DispatchQueue = DispatchQueue.main + + /// A closure executed when the network reachability status changes. + open var listener: Listener? + + open var flags: SCNetworkReachabilityFlags? { + var flags = SCNetworkReachabilityFlags() + + if SCNetworkReachabilityGetFlags(reachability, &flags) { + return flags + } + + return nil + } + + private let reachability: SCNetworkReachability + open var previousFlags: SCNetworkReachabilityFlags + + // MARK: - Initialization + + /// Creates a `NetworkReachabilityManager` instance with the specified host. + /// + /// - parameter host: The host used to evaluate network reachability. + /// + /// - returns: The new `NetworkReachabilityManager` instance. + public convenience init?(host: String) { + guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } + self.init(reachability: reachability) + } + + /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. + /// + /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing + /// status of the device, both IPv4 and IPv6. + /// + /// - returns: The new `NetworkReachabilityManager` instance. + public convenience init?() { + var address = sockaddr_in() + address.sin_len = UInt8(MemoryLayout.size) + address.sin_family = sa_family_t(AF_INET) + + guard let reachability = withUnsafePointer(to: &address, { pointer in + return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { + return SCNetworkReachabilityCreateWithAddress(nil, $0) + } + }) else { return nil } + + self.init(reachability: reachability) + } + + private init(reachability: SCNetworkReachability) { + self.reachability = reachability + + // Set the previous flags to an unreserved value to represent unknown status + self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) + } + + deinit { + stopListening() + } + + // MARK: - Listening + + /// Starts listening for changes in network reachability status. + /// + /// - returns: `true` if listening was started successfully, `false` otherwise. + @discardableResult + open func startListening() -> Bool { + var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) + context.info = Unmanaged.passUnretained(self).toOpaque() + + let callbackEnabled = SCNetworkReachabilitySetCallback( + reachability, { (_, flags, info) in + let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() + reachability.notifyListener(flags) + }, + &context + ) + + let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) + + listenerQueue.async { + self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) + + guard let flags = self.flags else { return } + + self.notifyListener(flags) + } + + return callbackEnabled && queueEnabled + } + + /// Stops listening for changes in network reachability status. + open func stopListening() { + SCNetworkReachabilitySetCallback(reachability, nil, nil) + SCNetworkReachabilitySetDispatchQueue(reachability, nil) + } + + // MARK: - Internal - Listener Notification + + func notifyListener(_ flags: SCNetworkReachabilityFlags) { + guard previousFlags != flags else { return } + previousFlags = flags + + listener?(networkReachabilityStatusForFlags(flags)) + } + + // MARK: - Internal - Network Reachability Status + + func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { + guard isNetworkReachable(with: flags) else { return .notReachable } + + var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) + + #if os(iOS) + if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } + #endif + + return networkStatus + } + + func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { + let isReachable = flags.contains(.reachable) + let needsConnection = flags.contains(.connectionRequired) + let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) + let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) + + return isReachable && (!needsConnection || canConnectWithoutUserInteraction) + } +} + +// MARK: - + +extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} + +/// Returns whether the two network reachability status values are equal. +/// +/// - parameter lhs: The left-hand side value to compare. +/// - parameter rhs: The right-hand side value to compare. +/// +/// - returns: `true` if the two values are equal, `false` otherwise. +public func ==( + lhs: NetworkReachabilityManager.NetworkReachabilityStatus, + rhs: NetworkReachabilityManager.NetworkReachabilityStatus) + -> Bool { + switch (lhs, rhs) { + case (.unknown, .unknown): + return true + case (.notReachable, .notReachable): + return true + case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): + return lhsConnectionType == rhsConnectionType + default: + return false + } +} + +#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift new file mode 100644 index 000000000000..dc8e75e847df --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift @@ -0,0 +1,482 @@ +// +// ParameterEncoding.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// HTTP method definitions. +/// +/// See https://tools.ietf.org/html/rfc7231#section-4.3 +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +// MARK: - + +/// A dictionary of parameters to apply to a `URLRequest`. +public typealias Parameters = [String: Any] + +/// A type used to define how a set of parameters are applied to a `URLRequest`. +public protocol ParameterEncoding { + /// 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. + /// + /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. + /// + /// - returns: The encoded request. + func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest +} + +// MARK: - + +/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +/// the HTTP body depends on the destination of the encoding. +/// +/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to +/// `application/x-www-form-urlencoded; charset=utf-8`. +/// +/// There is no published specification for how to encode collection types. By default the convention of appending +/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for +/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the +/// square brackets appended to array keys. +/// +/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode +/// `true` as 1 and `false` as 0. +public struct URLEncoding: ParameterEncoding { + + // MARK: Helper Types + + /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the + /// resulting URL request. + /// + /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` + /// requests and sets as the HTTP body for requests with any other HTTP method. + /// - queryString: Sets or appends encoded query string result to existing query string. + /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. + public enum Destination { + case methodDependent, queryString, httpBody + } + + /// Configures how `Array` parameters are encoded. + /// + /// - brackets: An empty set of square brackets is appended to the key for every value. + /// This is the default behavior. + /// - noBrackets: No brackets are appended. The key is encoded as is. + public enum ArrayEncoding { + case brackets, noBrackets + + func encode(key: String) -> String { + switch self { + case .brackets: + return "\(key)[]" + case .noBrackets: + return key + } + } + } + + /// Configures how `Bool` parameters are encoded. + /// + /// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior. + /// - literal: Encode `true` and `false` as string literals. + public enum BoolEncoding { + case numeric, literal + + func encode(value: Bool) -> String { + switch self { + case .numeric: + return value ? "1" : "0" + case .literal: + return value ? "true" : "false" + } + } + } + + // MARK: Properties + + /// Returns a default `URLEncoding` instance. + public static var `default`: URLEncoding { return URLEncoding() } + + /// Returns a `URLEncoding` instance with a `.methodDependent` destination. + public static var methodDependent: URLEncoding { return URLEncoding() } + + /// Returns a `URLEncoding` instance with a `.queryString` destination. + public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } + + /// Returns a `URLEncoding` instance with an `.httpBody` destination. + public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } + + /// The destination defining where the encoded query string is to be applied to the URL request. + public let destination: Destination + + /// The encoding to use for `Array` parameters. + public let arrayEncoding: ArrayEncoding + + /// The encoding to use for `Bool` parameters. + public let boolEncoding: BoolEncoding + + // MARK: Initialization + + /// Creates a `URLEncoding` instance using the specified destination. + /// + /// - parameter destination: The destination defining where the encoded query string is to be applied. + /// - parameter arrayEncoding: The encoding to use for `Array` parameters. + /// - parameter boolEncoding: The encoding to use for `Bool` parameters. + /// + /// - returns: The new `URLEncoding` instance. + public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) { + self.destination = destination + self.arrayEncoding = arrayEncoding + self.boolEncoding = boolEncoding + } + + // 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. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { + guard let url = urlRequest.url else { + throw AFError.parameterEncodingFailed(reason: .missingURL) + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) + urlComponents.percentEncodedQuery = percentEncodedQuery + urlRequest.url = urlComponents.url + } + } else { + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) + } + + return urlRequest + } + + /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. + /// + /// - parameter key: The key of the query component. + /// - parameter value: The value of the query component. + /// + /// - returns: The percent-escaped, URL encoded query string components. + public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { + var components: [(String, String)] = [] + + if let dictionary = value as? [String: Any] { + for (nestedKey, value) in dictionary { + components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) + } + } else if let array = value as? [Any] { + for value in array { + components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value) + } + } else if let value = value as? NSNumber { + if value.isBool { + components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue)))) + } else { + components.append((escape(key), escape("\(value)"))) + } + } else if let bool = value as? Bool { + components.append((escape(key), escape(boolEncoding.encode(value: bool)))) + } else { + components.append((escape(key), escape("\(value)"))) + } + + return components + } + + /// Returns a percent-escaped string following RFC 3986 for a query string key or value. + /// + /// RFC 3986 states that the following characters are "reserved" characters. + /// + /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + /// + /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + /// should be percent-escaped in the query string. + /// + /// - parameter string: The string to be percent-escaped. + /// + /// - returns: The percent-escaped string. + public func escape(_ string: String) -> String { + let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 + let subDelimitersToEncode = "!$&'()*+,;=" + + var allowedCharacterSet = CharacterSet.urlQueryAllowed + allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") + + var escaped = "" + + //========================================================================================================== + // + // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few + // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no + // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more + // info, please refer to: + // + // - https://github.com/Alamofire/Alamofire/issues/206 + // + //========================================================================================================== + + if #available(iOS 8.3, *) { + escaped = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string + } else { + let batchSize = 50 + var index = string.startIndex + + while index != string.endIndex { + let startIndex = index + let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex + let range = startIndex.. String { + var components: [(String, String)] = [] + + for key in parameters.keys.sorted(by: <) { + let value = parameters[key]! + components += queryComponents(fromKey: key, value: value) + } + return components.map { "\($0)=\($1)" }.joined(separator: "&") + } + + private func encodesParametersInURL(with method: HTTPMethod) -> Bool { + switch destination { + case .queryString: + return true + case .httpBody: + return false + default: + break + } + + switch method { + case .get, .head, .delete: + return true + default: + return false + } + } +} + +// MARK: - + +/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the +/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. +public struct JSONEncoding: ParameterEncoding { + + // MARK: Properties + + /// Returns a `JSONEncoding` instance with default writing options. + public static var `default`: JSONEncoding { return JSONEncoding() } + + /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. + public static var prettyPrinted: JSONEncoding { return JSONEncoding(options: .prettyPrinted) } + + /// The options for writing the parameters as JSON data. + public let options: JSONSerialization.WritingOptions + + // MARK: Initialization + + /// Creates a `JSONEncoding` instance using the specified options. + /// + /// - parameter options: The options for writing the parameters as JSON data. + /// + /// - returns: The new `JSONEncoding` instance. + public init(options: JSONSerialization.WritingOptions = []) { + self.options = options + } + + // 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. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + do { + let data = try JSONSerialization.data(withJSONObject: parameters, options: options) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) + } + + return urlRequest + } + + /// Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body. + /// + /// - parameter urlRequest: The request to apply the JSON object to. + /// - parameter jsonObject: The JSON object to apply to the request. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let jsonObject = jsonObject else { return urlRequest } + + do { + let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) + } + + return urlRequest + } +} + +// MARK: - + +/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the +/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header +/// field of an encoded request is set to `application/x-plist`. +public struct PropertyListEncoding: ParameterEncoding { + + // MARK: Properties + + /// Returns a default `PropertyListEncoding` instance. + public static var `default`: PropertyListEncoding { return PropertyListEncoding() } + + /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. + public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } + + /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. + public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } + + /// The property list serialization format. + public let format: PropertyListSerialization.PropertyListFormat + + /// The options for writing the parameters as plist data. + public let options: PropertyListSerialization.WriteOptions + + // MARK: Initialization + + /// Creates a `PropertyListEncoding` instance using the specified format and options. + /// + /// - parameter format: The property list serialization format. + /// - parameter options: The options for writing the parameters as plist data. + /// + /// - returns: The new `PropertyListEncoding` instance. + public init( + format: PropertyListSerialization.PropertyListFormat = .xml, + options: PropertyListSerialization.WriteOptions = 0) { + self.format = format + self.options = options + } + + // 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. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + do { + let data = try PropertyListSerialization.data( + fromPropertyList: parameters, + format: format, + options: options + ) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) + } + + return urlRequest + } +} + +// MARK: - + +extension NSNumber { + fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift new file mode 100644 index 000000000000..9cd75057cae2 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift @@ -0,0 +1,658 @@ +// +// Request.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. +public protocol RequestAdapter { + /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. + /// + /// - parameter urlRequest: The URL request to adapt. + /// + /// - throws: An `Error` if the adaptation encounters an error. + /// + /// - returns: The adapted `URLRequest`. + func adapt(_ urlRequest: URLRequest) throws -> URLRequest +} + +// MARK: - + +/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. +public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void + +/// A type that determines whether a request should be retried after being executed by the specified session manager +/// and encountering an error. +public protocol RequestRetrier { + /// Determines whether the `Request` should be retried by calling the `completion` closure. + /// + /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs + /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly + /// cleaned up after. + /// + /// - parameter manager: The session manager the request was executed on. + /// - parameter request: The request that failed due to the encountered error. + /// - parameter error: The error encountered when executing the request. + /// - parameter completion: The completion closure to be executed when retry decision has been determined. + func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) +} + +// MARK: - + +protocol TaskConvertible { + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask +} + +/// A dictionary of headers to apply to a `URLRequest`. +public typealias HTTPHeaders = [String: String] + +// MARK: - + +/// Responsible for sending a request and receiving the response and associated data from the server, as well as +/// managing its underlying `URLSessionTask`. +open class Request { + + // MARK: Helper Types + + /// A closure executed when monitoring upload or download progress of a request. + public typealias ProgressHandler = (Progress) -> Void + + enum RequestTask { + case data(TaskConvertible?, URLSessionTask?) + case download(TaskConvertible?, URLSessionTask?) + case upload(TaskConvertible?, URLSessionTask?) + case stream(TaskConvertible?, URLSessionTask?) + } + + // MARK: Properties + + /// The delegate for the underlying task. + open internal(set) var delegate: TaskDelegate { + get { + taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } + return taskDelegate + } + set { + taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } + taskDelegate = newValue + } + } + + /// The underlying task. + open var task: URLSessionTask? { return delegate.task } + + /// The session belonging to the underlying task. + public let session: URLSession + + /// The request sent or to be sent to the server. + open var request: URLRequest? { return task?.originalRequest } + + /// The response received from the server, if any. + open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } + + /// The number of times the request has been retried. + open internal(set) var retryCount: UInt = 0 + + let originalTask: TaskConvertible? + + var startTime: CFAbsoluteTime? + var endTime: CFAbsoluteTime? + + var validations: [() -> Void] = [] + + private var taskDelegate: TaskDelegate + private var taskDelegateLock = NSLock() + + // MARK: Lifecycle + + init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { + self.session = session + + switch requestTask { + case .data(let originalTask, let task): + taskDelegate = DataTaskDelegate(task: task) + self.originalTask = originalTask + case .download(let originalTask, let task): + taskDelegate = DownloadTaskDelegate(task: task) + self.originalTask = originalTask + case .upload(let originalTask, let task): + taskDelegate = UploadTaskDelegate(task: task) + self.originalTask = originalTask + case .stream(let originalTask, let task): + taskDelegate = TaskDelegate(task: task) + self.originalTask = originalTask + } + + delegate.error = error + delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } + } + + // MARK: Authentication + + /// Associates an HTTP Basic credential with the request. + /// + /// - parameter user: The user. + /// - parameter password: The password. + /// - parameter persistence: The URL credential persistence. `.ForSession` by default. + /// + /// - returns: The request. + @discardableResult + open func authenticate( + user: String, + password: String, + persistence: URLCredential.Persistence = .forSession) + -> Self { + let credential = URLCredential(user: user, password: password, persistence: persistence) + return authenticate(usingCredential: credential) + } + + /// Associates a specified credential with the request. + /// + /// - parameter credential: The credential. + /// + /// - returns: The request. + @discardableResult + open func authenticate(usingCredential credential: URLCredential) -> Self { + delegate.credential = credential + return self + } + + /// Returns a base64 encoded basic authentication credential as an authorization header tuple. + /// + /// - parameter user: The user. + /// - parameter password: The password. + /// + /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. + open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { + guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } + + let credential = data.base64EncodedString(options: []) + + return (key: "Authorization", value: "Basic \(credential)") + } + + // MARK: State + + /// Resumes the request. + open func resume() { + guard let task = task else { delegate.queue.isSuspended = false ; return } + + if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } + + task.resume() + + NotificationCenter.default.post( + name: Notification.Name.Task.DidResume, + object: self, + userInfo: [Notification.Key.Task: task] + ) + } + + /// Suspends the request. + open func suspend() { + guard let task = task else { return } + + task.suspend() + + NotificationCenter.default.post( + name: Notification.Name.Task.DidSuspend, + object: self, + userInfo: [Notification.Key.Task: task] + ) + } + + /// Cancels the request. + open func cancel() { + guard let task = task else { return } + + task.cancel() + + NotificationCenter.default.post( + name: Notification.Name.Task.DidCancel, + object: self, + userInfo: [Notification.Key.Task: task] + ) + } +} + +// MARK: - CustomStringConvertible + +extension Request: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as + /// well as the response status code if a response has been received. + open var description: String { + var components: [String] = [] + + if let HTTPMethod = request?.httpMethod { + components.append(HTTPMethod) + } + + if let urlString = request?.url?.absoluteString { + components.append(urlString) + } + + if let response = response { + components.append("(\(response.statusCode))") + } + + return components.joined(separator: " ") + } +} + +// MARK: - CustomDebugStringConvertible + +extension Request: CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, in the form of a cURL command. + open var debugDescription: String { + return cURLRepresentation() + } + + func cURLRepresentation() -> String { + var components = ["$ curl -v"] + + guard let request = self.request, + let url = request.url, + let host = url.host + else { + return "$ curl command could not be created" + } + + if let httpMethod = request.httpMethod, httpMethod != "GET" { + components.append("-X \(httpMethod)") + } + + if let credentialStorage = self.session.configuration.urlCredentialStorage { + let protectionSpace = URLProtectionSpace( + host: host, + port: url.port ?? 0, + protocol: url.scheme, + realm: host, + authenticationMethod: NSURLAuthenticationMethodHTTPBasic + ) + + if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { + for credential in credentials { + guard let user = credential.user, let password = credential.password else { continue } + components.append("-u \(user):\(password)") + } + } else { + if let credential = delegate.credential, let user = credential.user, let password = credential.password { + components.append("-u \(user):\(password)") + } + } + } + + if session.configuration.httpShouldSetCookies { + if + let cookieStorage = session.configuration.httpCookieStorage, + let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty + { + let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } + + #if swift(>=3.2) + components.append("-b \"\(string[.. URLSessionTask { + do { + let urlRequest = try self.urlRequest.adapt(using: adapter) + return queue.sync { session.dataTask(with: urlRequest) } + } catch { + throw AdaptError(error: error) + } + } + } + + // MARK: Properties + + /// The request sent or to be sent to the server. + open override var request: URLRequest? { + if let request = super.request { return request } + if let requestable = originalTask as? Requestable { return requestable.urlRequest } + + return nil + } + + /// The progress of fetching the response data from the server for the request. + open var progress: Progress { return dataDelegate.progress } + + var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } + + // MARK: Stream + + /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + /// + /// This closure returns the bytes most recently received from the server, not including data from previous calls. + /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is + /// also important to note that the server data in any `Response` object will be `nil`. + /// + /// - parameter closure: The code to be executed periodically during the lifecycle of the request. + /// + /// - returns: The request. + @discardableResult + open func stream(closure: ((Data) -> Void)? = nil) -> Self { + dataDelegate.dataStream = closure + return self + } + + // MARK: Progress + + /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is read from the server. + /// + /// - returns: The request. + @discardableResult + open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + dataDelegate.progressHandler = (closure, queue) + return self + } +} + +// MARK: - + +/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. +open class DownloadRequest: Request { + + // MARK: Helper Types + + /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the + /// destination URL. + public struct DownloadOptions: OptionSet { + /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. + public let rawValue: UInt + + /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. + public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) + + /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. + public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) + + /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. + /// + /// - parameter rawValue: The raw bitmask value for the option. + /// + /// - returns: A new log level instance. + public init(rawValue: UInt) { + self.rawValue = rawValue + } + } + + /// A closure executed once a download request has successfully completed in order to determine where to move the + /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL + /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and + /// the options defining how the file should be moved. + public typealias DownloadFileDestination = ( + _ temporaryURL: URL, + _ response: HTTPURLResponse) + -> (destinationURL: URL, options: DownloadOptions) + + enum Downloadable: TaskConvertible { + case request(URLRequest) + case resumeData(Data) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + do { + let task: URLSessionTask + + switch self { + case let .request(urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.downloadTask(with: urlRequest) } + case let .resumeData(resumeData): + task = queue.sync { session.downloadTask(withResumeData: resumeData) } + } + + return task + } catch { + throw AdaptError(error: error) + } + } + } + + // MARK: Properties + + /// The request sent or to be sent to the server. + open override var request: URLRequest? { + if let request = super.request { return request } + + if let downloadable = originalTask as? Downloadable, case let .request(urlRequest) = downloadable { + return urlRequest + } + + return nil + } + + /// The resume data of the underlying download task if available after a failure. + open var resumeData: Data? { return downloadDelegate.resumeData } + + /// The progress of downloading the response data from the server for the request. + open var progress: Progress { return downloadDelegate.progress } + + var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } + + // MARK: State + + /// Cancels the request. + override open func cancel() { + cancel(createResumeData: true) + } + + /// Cancels the request. + /// + /// - parameter createResumeData: Determines whether resume data is created via the underlying download task or not. + open func cancel(createResumeData: Bool) { + if createResumeData { + downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } + } else { + downloadDelegate.downloadTask.cancel() + } + + NotificationCenter.default.post( + name: Notification.Name.Task.DidCancel, + object: self, + userInfo: [Notification.Key.Task: task as Any] + ) + } + + // MARK: Progress + + /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is read from the server. + /// + /// - returns: The request. + @discardableResult + open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + downloadDelegate.progressHandler = (closure, queue) + return self + } + + // MARK: Destination + + /// Creates a download file destination closure which uses the default file manager to move the temporary file to a + /// file URL in the first available directory with the specified search path directory and search path domain mask. + /// + /// - parameter directory: The search path directory. `.DocumentDirectory` by default. + /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. + /// + /// - returns: A download file destination closure. + open class func suggestedDownloadDestination( + for directory: FileManager.SearchPathDirectory = .documentDirectory, + in domain: FileManager.SearchPathDomainMask = .userDomainMask) + -> DownloadFileDestination { + return { temporaryURL, response in + let directoryURLs = FileManager.default.urls(for: directory, in: domain) + + if !directoryURLs.isEmpty { + return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) + } + + return (temporaryURL, []) + } + } +} + +// MARK: - + +/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. +open class UploadRequest: DataRequest { + + // MARK: Helper Types + + enum Uploadable: TaskConvertible { + case data(Data, URLRequest) + case file(URL, URLRequest) + case stream(InputStream, URLRequest) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + do { + let task: URLSessionTask + + switch self { + case let .data(data, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.uploadTask(with: urlRequest, from: data) } + case let .file(url, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } + case let .stream(_, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } + } + + return task + } catch { + throw AdaptError(error: error) + } + } + } + + // MARK: Properties + + /// The request sent or to be sent to the server. + open override var request: URLRequest? { + if let request = super.request { return request } + + guard let uploadable = originalTask as? Uploadable else { return nil } + + switch uploadable { + case .data(_, let urlRequest), .file(_, let urlRequest), .stream(_, let urlRequest): + return urlRequest + } + } + + /// The progress of uploading the payload to the server for the upload request. + open var uploadProgress: Progress { return uploadDelegate.uploadProgress } + + var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } + + // MARK: Upload Progress + + /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to + /// the server. + /// + /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress + /// of data being read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is sent to the server. + /// + /// - returns: The request. + @discardableResult + open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + uploadDelegate.uploadProgressHandler = (closure, queue) + return self + } +} + +// MARK: - + +#if !os(watchOS) + +/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) +open class StreamRequest: Request { + enum Streamable: TaskConvertible { + case stream(hostName: String, port: Int) + case netService(NetService) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask + + switch self { + case let .stream(hostName, port): + task = queue.sync { session.streamTask(withHostName: hostName, port: port) } + case let .netService(netService): + task = queue.sync { session.streamTask(with: netService) } + } + + return task + } + } +} + +#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift new file mode 100644 index 000000000000..88d09e33ff8e --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift @@ -0,0 +1,563 @@ +// +// Response.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Used to store all data associated with an non-serialized response of a data or upload request. +public struct DefaultDataResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The data returned by the server. + public let data: Data? + + /// The error encountered while executing or validating the request. + public let error: Error? + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + + var _metrics: AnyObject? + + /// Creates a `DefaultDataResponse` instance from the specified parameters. + /// + /// - Parameters: + /// - request: The URL request sent to the server. + /// - response: The server's response to the URL request. + /// - data: The data returned by the server. + /// - error: The error encountered while executing or validating the request. + /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. + /// - metrics: The task metrics containing the request / response statistics. `nil` by default. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + error: Error?, + timeline: Timeline = Timeline(), + metrics: AnyObject? = nil) { + self.request = request + self.response = response + self.data = data + self.error = error + self.timeline = timeline + } +} + +// MARK: - + +/// Used to store all data associated with a serialized response of a data or upload request. +public struct DataResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The data returned by the server. + public let data: Data? + + /// The result of response serialization. + public let result: Result + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + + /// Returns the associated value of the result if it is a success, `nil` otherwise. + public var value: Value? { return result.value } + + /// Returns the associated error value if the result if it is a failure, `nil` otherwise. + public var error: Error? { return result.error } + + var _metrics: AnyObject? + + /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. + /// + /// - parameter request: The URL request sent to the server. + /// - parameter response: The server's response to the URL request. + /// - parameter data: The data returned by the server. + /// - parameter result: The result of response serialization. + /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + /// + /// - returns: The new `DataResponse` instance. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + result: Result, + timeline: Timeline = Timeline()) { + self.request = request + self.response = response + self.data = data + self.result = result + self.timeline = timeline + } +} + +// MARK: - + +extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + return result.debugDescription + } + + /// The debug textual representation used when written to an output stream, which includes the URL request, the URL + /// response, the server data, the response serialization result and the timeline. + public var debugDescription: String { + var output: [String] = [] + + output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") + output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") + output.append("[Data]: \(data?.count ?? 0) bytes") + output.append("[Result]: \(result.debugDescription)") + output.append("[Timeline]: \(timeline.debugDescription)") + + return output.joined(separator: "\n") + } +} + +// MARK: - + +extension DataResponse { + /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleInt = possibleData.map { $0.count } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's + /// result is a failure, returns a response wrapping the same failure. + public func map(_ transform: (Value) -> T) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.map(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result + /// value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's + /// result is a failure, returns the same failure. + public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.flatMap(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `mapError` function with a closure that does not throw. For example: + /// + /// let possibleData: DataResponse = ... + /// let withMyError = possibleData.mapError { MyError.error($0) } + /// + /// - Parameter transform: A closure that takes the error of the instance. + /// - Returns: A `DataResponse` instance containing the result of the transform. + public func mapError(_ transform: (Error) -> E) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.mapError(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `flatMapError` function with a closure that may throw an error. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleObject = possibleData.flatMapError { + /// try someFailableFunction(taking: $0) + /// } + /// + /// - Parameter transform: A throwing closure that takes the error of the instance. + /// + /// - Returns: A `DataResponse` instance containing the result of the transform. + public func flatMapError(_ transform: (Error) throws -> E) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.flatMapError(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } +} + +// MARK: - + +/// Used to store all data associated with an non-serialized response of a download request. +public struct DefaultDownloadResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The temporary destination URL of the data returned from the server. + public let temporaryURL: URL? + + /// The final destination URL of the data returned from the server if it was moved. + public let destinationURL: URL? + + /// The resume data generated if the request was cancelled. + public let resumeData: Data? + + /// The error encountered while executing or validating the request. + public let error: Error? + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + + var _metrics: AnyObject? + + /// Creates a `DefaultDownloadResponse` instance from the specified parameters. + /// + /// - Parameters: + /// - request: The URL request sent to the server. + /// - response: The server's response to the URL request. + /// - temporaryURL: The temporary destination URL of the data returned from the server. + /// - destinationURL: The final destination URL of the data returned from the server if it was moved. + /// - resumeData: The resume data generated if the request was cancelled. + /// - error: The error encountered while executing or validating the request. + /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. + /// - metrics: The task metrics containing the request / response statistics. `nil` by default. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + temporaryURL: URL?, + destinationURL: URL?, + resumeData: Data?, + error: Error?, + timeline: Timeline = Timeline(), + metrics: AnyObject? = nil) { + self.request = request + self.response = response + self.temporaryURL = temporaryURL + self.destinationURL = destinationURL + self.resumeData = resumeData + self.error = error + self.timeline = timeline + } +} + +// MARK: - + +/// Used to store all data associated with a serialized response of a download request. +public struct DownloadResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The temporary destination URL of the data returned from the server. + public let temporaryURL: URL? + + /// The final destination URL of the data returned from the server if it was moved. + public let destinationURL: URL? + + /// The resume data generated if the request was cancelled. + public let resumeData: Data? + + /// The result of response serialization. + public let result: Result + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + + /// Returns the associated value of the result if it is a success, `nil` otherwise. + public var value: Value? { return result.value } + + /// Returns the associated error value if the result if it is a failure, `nil` otherwise. + public var error: Error? { return result.error } + + var _metrics: AnyObject? + + /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. + /// + /// - parameter request: The URL request sent to the server. + /// - parameter response: The server's response to the URL request. + /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. + /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. + /// - parameter resumeData: The resume data generated if the request was cancelled. + /// - parameter result: The result of response serialization. + /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + /// + /// - returns: The new `DownloadResponse` instance. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + temporaryURL: URL?, + destinationURL: URL?, + resumeData: Data?, + result: Result, + timeline: Timeline = Timeline()) { + self.request = request + self.response = response + self.temporaryURL = temporaryURL + self.destinationURL = destinationURL + self.resumeData = resumeData + self.result = result + self.timeline = timeline + } +} + +// MARK: - + +extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + return result.debugDescription + } + + /// The debug textual representation used when written to an output stream, which includes the URL request, the URL + /// response, the temporary and destination URLs, the resume data, the response serialization result and the + /// timeline. + public var debugDescription: String { + var output: [String] = [] + + output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") + output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") + output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") + output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") + output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") + output.append("[Result]: \(result.debugDescription)") + output.append("[Timeline]: \(timeline.debugDescription)") + + return output.joined(separator: "\n") + } +} + +// MARK: - + +extension DownloadResponse { + /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleInt = possibleData.map { $0.count } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's + /// result is a failure, returns a response wrapping the same failure. + public func map(_ transform: (Value) -> T) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.map(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this + /// instance's result is a failure, returns the same failure. + public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.flatMap(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `mapError` function with a closure that does not throw. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let withMyError = possibleData.mapError { MyError.error($0) } + /// + /// - Parameter transform: A closure that takes the error of the instance. + /// - Returns: A `DownloadResponse` instance containing the result of the transform. + public func mapError(_ transform: (Error) -> E) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.mapError(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `flatMapError` function with a closure that may throw an error. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleObject = possibleData.flatMapError { + /// try someFailableFunction(taking: $0) + /// } + /// + /// - Parameter transform: A throwing closure that takes the error of the instance. + /// + /// - Returns: A `DownloadResponse` instance containing the result of the transform. + public func flatMapError(_ transform: (Error) throws -> E) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.flatMapError(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } +} + +// MARK: - + +protocol Response { + /// The task metrics containing the request / response statistics. + var _metrics: AnyObject? { get set } + mutating func add(_ metrics: AnyObject?) +} + +extension Response { + mutating func add(_ metrics: AnyObject?) { + #if !os(watchOS) + guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } + guard let metrics = metrics as? URLSessionTaskMetrics else { return } + + _metrics = metrics + #endif + } +} + +// MARK: - + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DefaultDataResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DataResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DefaultDownloadResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DownloadResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift new file mode 100644 index 000000000000..b8f5b65b204d --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift @@ -0,0 +1,697 @@ +// +// ResponseSerialization.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// The type in which all data response serializers must conform to in order to serialize a response. +public protocol DataResponseSerializerProtocol { + /// The type of serialized object to be created by this `DataResponseSerializerType`. + associatedtype SerializedObject + + /// A closure used by response handlers that takes a request, response, data and error and returns a result. + var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } +} + +// MARK: - + +/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. +public struct DataResponseSerializer: DataResponseSerializerProtocol { + /// The type of serialized object to be created by this `DataResponseSerializer`. + public typealias SerializedObject = Value + + /// A closure used by response handlers that takes a request, response, data and error and returns a result. + public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result + + /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// + /// - parameter serializeResponse: The closure used to serialize the response. + /// + /// - returns: The new generic response serializer instance. + public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { + self.serializeResponse = serializeResponse + } +} + +// MARK: - + +/// The type in which all download response serializers must conform to in order to serialize a response. +public protocol DownloadResponseSerializerProtocol { + /// The type of serialized object to be created by this `DownloadResponseSerializerType`. + associatedtype SerializedObject + + /// A closure used by response handlers that takes a request, response, url and error and returns a result. + var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } +} + +// MARK: - + +/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. +public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { + /// The type of serialized object to be created by this `DownloadResponseSerializer`. + public typealias SerializedObject = Value + + /// A closure used by response handlers that takes a request, response, url and error and returns a result. + public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result + + /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// + /// - parameter serializeResponse: The closure used to serialize the response. + /// + /// - returns: The new generic response serializer instance. + public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { + self.serializeResponse = serializeResponse + } +} + +// MARK: - Timeline + +extension Request { + var timeline: Timeline { + let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() + let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() + let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + + return Timeline( + requestStartTime: requestStartTime, + initialResponseTime: initialResponseTime, + requestCompletedTime: requestCompletedTime, + serializationCompletedTime: CFAbsoluteTimeGetCurrent() + ) + } +} + +// MARK: - Default + +extension DataRequest { + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { + delegate.queue.addOperation { + (queue ?? DispatchQueue.main).async { + var dataResponse = DefaultDataResponse( + request: self.request, + response: self.response, + data: self.delegate.data, + error: self.delegate.error, + timeline: self.timeline + ) + + dataResponse.add(self.delegate.metrics) + + completionHandler(dataResponse) + } + } + + return self + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, + /// and data. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + responseSerializer: T, + completionHandler: @escaping (DataResponse) -> Void) + -> Self { + delegate.queue.addOperation { + let result = responseSerializer.serializeResponse( + self.request, + self.response, + self.delegate.data, + self.delegate.error + ) + + var dataResponse = DataResponse( + request: self.request, + response: self.response, + data: self.delegate.data, + result: result, + timeline: self.timeline + ) + + dataResponse.add(self.delegate.metrics) + + (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } + } + + return self + } +} + +extension DownloadRequest { + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DefaultDownloadResponse) -> Void) + -> Self { + delegate.queue.addOperation { + (queue ?? DispatchQueue.main).async { + var downloadResponse = DefaultDownloadResponse( + request: self.request, + response: self.response, + temporaryURL: self.downloadDelegate.temporaryURL, + destinationURL: self.downloadDelegate.destinationURL, + resumeData: self.downloadDelegate.resumeData, + error: self.downloadDelegate.error, + timeline: self.timeline + ) + + downloadResponse.add(self.delegate.metrics) + + completionHandler(downloadResponse) + } + } + + return self + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, + /// and data contained in the destination url. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + responseSerializer: T, + completionHandler: @escaping (DownloadResponse) -> Void) + -> Self { + delegate.queue.addOperation { + let result = responseSerializer.serializeResponse( + self.request, + self.response, + self.downloadDelegate.fileURL, + self.downloadDelegate.error + ) + + var downloadResponse = DownloadResponse( + request: self.request, + response: self.response, + temporaryURL: self.downloadDelegate.temporaryURL, + destinationURL: self.downloadDelegate.destinationURL, + resumeData: self.downloadDelegate.resumeData, + result: result, + timeline: self.timeline + ) + + downloadResponse.add(self.delegate.metrics) + + (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } + } + + return self + } +} + +// MARK: - Data + +extension Request { + /// Returns a result data type that contains the response data as-is. + /// + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } + + guard let validData = data else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) + } + + return .success(validData) + } +} + +extension DataRequest { + /// Creates a response serializer that returns the associated data as-is. + /// + /// - returns: A data response serializer. + public static func dataResponseSerializer() -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseData(response: response, data: data, error: error) + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseData( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DataRequest.dataResponseSerializer(), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns the associated data as-is. + /// + /// - returns: A data response serializer. + public static func dataResponseSerializer() -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } + + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseData(response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseData( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DownloadResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DownloadRequest.dataResponseSerializer(), + completionHandler: completionHandler + ) + } +} + +// MARK: - String + +extension Request { + /// Returns a result string type initialized from the response data with the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseString( + encoding: String.Encoding?, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } + + guard let validData = data else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) + } + + var convertedEncoding = encoding + + if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { + convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( + CFStringConvertIANACharSetNameToEncoding(encodingName)) + ) + } + + let actualEncoding = convertedEncoding ?? .isoLatin1 + + if let string = String(data: validData, encoding: actualEncoding) { + return .success(string) + } else { + return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) + } + } +} + +extension DataRequest { + /// Creates a response serializer that returns a result string type initialized from the response data with + /// the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// + /// - returns: A string response serializer. + public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + /// server response, falling back to the default HTTP default character set, + /// ISO-8859-1. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseString( + queue: DispatchQueue? = nil, + encoding: String.Encoding? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns a result string type initialized from the response data with + /// the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// + /// - returns: A string response serializer. + public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } + + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + /// server response, falling back to the default HTTP default character set, + /// ISO-8859-1. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseString( + queue: DispatchQueue? = nil, + encoding: String.Encoding? = nil, + completionHandler: @escaping (DownloadResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), + completionHandler: completionHandler + ) + } +} + +// MARK: - JSON + +extension Request { + /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` + /// with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseJSON( + options: JSONSerialization.ReadingOptions, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } + + guard let validData = data, validData.count > 0 else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) + } + + do { + let json = try JSONSerialization.jsonObject(with: validData, options: options) + return .success(json) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) + } + } +} + +extension DataRequest { + /// Creates a response serializer that returns a JSON object result type constructed from the response data using + /// `JSONSerialization` with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// + /// - returns: A JSON object response serializer. + public static func jsonResponseSerializer( + options: JSONSerialization.ReadingOptions = .allowFragments) + -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseJSON( + queue: DispatchQueue? = nil, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (DataResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DataRequest.jsonResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns a JSON object result type constructed from the response data using + /// `JSONSerialization` with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// + /// - returns: A JSON object response serializer. + public static func jsonResponseSerializer( + options: JSONSerialization.ReadingOptions = .allowFragments) + -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } + + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseJSON( + queue: DispatchQueue? = nil, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (DownloadResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} + +// MARK: - Property List + +extension Request { + /// Returns a plist object contained in a result type constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponsePropertyList( + options: PropertyListSerialization.ReadOptions, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } + + guard let validData = data, validData.count > 0 else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) + } + + do { + let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) + return .success(plist) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) + } + } +} + +extension DataRequest { + /// Creates a response serializer that returns an object constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// + /// - returns: A property list object response serializer. + public static func propertyListResponseSerializer( + options: PropertyListSerialization.ReadOptions = []) + -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responsePropertyList( + queue: DispatchQueue? = nil, + options: PropertyListSerialization.ReadOptions = [], + completionHandler: @escaping (DataResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DataRequest.propertyListResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns an object constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// + /// - returns: A property list object response serializer. + public static func propertyListResponseSerializer( + options: PropertyListSerialization.ReadOptions = []) + -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } + + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responsePropertyList( + queue: DispatchQueue? = nil, + options: PropertyListSerialization.ReadOptions = [], + completionHandler: @escaping (DownloadResponse) -> Void) + -> Self { + return response( + queue: queue, + responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} + +/// A set of HTTP response status code that do not contain response data. +private let emptyDataStatusCodes: Set = [204, 205] diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift new file mode 100644 index 000000000000..ad4d5632a019 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -0,0 +1,306 @@ +// +// ServerTrustPolicy.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. +open class ServerTrustPolicyManager { + /// The dictionary of policies mapped to a particular host. + public let policies: [String: ServerTrustPolicy] + + /// Initializes the `ServerTrustPolicyManager` instance with the given policies. + /// + /// Since different servers and web services can have different leaf certificates, intermediate and even root + /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This + /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key + /// pinning for host3 and disabling evaluation for host4. + /// + /// - parameter policies: A dictionary of all policies mapped to a particular host. + /// + /// - returns: The new `ServerTrustPolicyManager` instance. + public init(policies: [String: ServerTrustPolicy]) { + self.policies = policies + } + + /// Returns the `ServerTrustPolicy` for the given host if applicable. + /// + /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override + /// this method and implement more complex mapping implementations such as wildcards. + /// + /// - parameter host: The host to use when searching for a matching policy. + /// + /// - returns: The server trust policy for the given host if found. + open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { + return policies[host] + } +} + +// MARK: - + +extension URLSession { + private struct AssociatedKeys { + static var managerKey = "URLSession.ServerTrustPolicyManager" + } + + var serverTrustPolicyManager: ServerTrustPolicyManager? { + get { + return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager + } + set (manager) { + objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + } +} + +// MARK: - ServerTrustPolicy + +/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when +/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. +/// +/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other +/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged +/// to route all communication over an HTTPS connection with pinning enabled. +/// +/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to +/// validate the host provided by the challenge. Applications are encouraged to always +/// validate the host in production environments to guarantee the validity of the server's +/// certificate chain. +/// +/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to +/// validate the host provided by the challenge as well as specify the revocation flags for +/// testing for revoked certificates. Apple platforms did not start testing for revoked +/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is +/// demonstrated in our TLS tests. Applications are encouraged to always validate the host +/// in production environments to guarantee the validity of the server's certificate chain. +/// +/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is +/// considered valid if one of the pinned certificates match one of the server certificates. +/// By validating both the certificate chain and host, certificate pinning provides a very +/// secure form of server trust validation mitigating most, if not all, MITM attacks. +/// Applications are encouraged to always validate the host and require a valid certificate +/// chain in production environments. +/// +/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered +/// valid if one of the pinned public keys match one of the server certificate public keys. +/// By validating both the certificate chain and host, public key pinning provides a very +/// secure form of server trust validation mitigating most, if not all, MITM attacks. +/// Applications are encouraged to always validate the host and require a valid certificate +/// chain in production environments. +/// +/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. +/// +/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. +public enum ServerTrustPolicy { + case performDefaultEvaluation(validateHost: Bool) + case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) + case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) + case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) + case disableEvaluation + case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) + + // MARK: - Bundle Location + + /// Returns all certificates within the given bundle with a `.cer` file extension. + /// + /// - parameter bundle: The bundle to search for all `.cer` files. + /// + /// - returns: All certificates within the given bundle. + public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { + var certificates: [SecCertificate] = [] + + let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in + bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) + }.joined()) + + for path in paths { + if + let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, + let certificate = SecCertificateCreateWithData(nil, certificateData) + { + certificates.append(certificate) + } + } + + return certificates + } + + /// Returns all public keys within the given bundle with a `.cer` file extension. + /// + /// - parameter bundle: The bundle to search for all `*.cer` files. + /// + /// - returns: All public keys within the given bundle. + public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { + var publicKeys: [SecKey] = [] + + for certificate in certificates(in: bundle) { + if let publicKey = publicKey(for: certificate) { + publicKeys.append(publicKey) + } + } + + return publicKeys + } + + // MARK: - Evaluation + + /// Evaluates whether the server trust is valid for the given host. + /// + /// - parameter serverTrust: The server trust to evaluate. + /// - parameter host: The host of the challenge protection space. + /// + /// - returns: Whether the server trust is valid. + public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { + var serverTrustIsValid = false + + switch self { + case let .performDefaultEvaluation(validateHost): + let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + SecTrustSetPolicies(serverTrust, policy) + + serverTrustIsValid = trustIsValid(serverTrust) + case let .performRevokedEvaluation(validateHost, revocationFlags): + let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) + SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) + + serverTrustIsValid = trustIsValid(serverTrust) + case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): + if validateCertificateChain { + let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + SecTrustSetPolicies(serverTrust, policy) + + SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) + SecTrustSetAnchorCertificatesOnly(serverTrust, true) + + serverTrustIsValid = trustIsValid(serverTrust) + } else { + let serverCertificatesDataArray = certificateData(for: serverTrust) + let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) + + outerLoop: for serverCertificateData in serverCertificatesDataArray { + for pinnedCertificateData in pinnedCertificatesDataArray { + if serverCertificateData == pinnedCertificateData { + serverTrustIsValid = true + break outerLoop + } + } + } + } + case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): + var certificateChainEvaluationPassed = true + + if validateCertificateChain { + let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + SecTrustSetPolicies(serverTrust, policy) + + certificateChainEvaluationPassed = trustIsValid(serverTrust) + } + + if certificateChainEvaluationPassed { + outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { + for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { + if serverPublicKey.isEqual(pinnedPublicKey) { + serverTrustIsValid = true + break outerLoop + } + } + } + } + case .disableEvaluation: + serverTrustIsValid = true + case let .customEvaluation(closure): + serverTrustIsValid = closure(serverTrust, host) + } + + return serverTrustIsValid + } + + // MARK: - Private - Trust Validation + + private func trustIsValid(_ trust: SecTrust) -> Bool { + var isValid = false + + var result = SecTrustResultType.invalid + let status = SecTrustEvaluate(trust, &result) + + if status == errSecSuccess { + let unspecified = SecTrustResultType.unspecified + let proceed = SecTrustResultType.proceed + + isValid = result == unspecified || result == proceed + } + + return isValid + } + + // MARK: - Private - Certificate Data + + private func certificateData(for trust: SecTrust) -> [Data] { + var certificates: [SecCertificate] = [] + + for index in 0.. [Data] { + return certificates.map { SecCertificateCopyData($0) as Data } + } + + // MARK: - Private - Public Key Extraction + + private static func publicKeys(for trust: SecTrust) -> [SecKey] { + var publicKeys: [SecKey] = [] + + for index in 0.. SecKey? { + var publicKey: SecKey? + + let policy = SecPolicyCreateBasicX509() + var trust: SecTrust? + let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) + + if let trust = trust, trustCreationStatus == errSecSuccess { + publicKey = SecTrustCopyPublicKey(trust) + } + + return publicKey + } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift new file mode 100644 index 000000000000..5cf4a385b2a5 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift @@ -0,0 +1,713 @@ +// +// SessionDelegate.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for handling all delegate callbacks for the underlying session. +open class SessionDelegate: NSObject { + + // MARK: URLSessionDelegate Overrides + + /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. + open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? + + /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. + open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. + open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. + open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? + + // MARK: URLSessionTaskDelegate Overrides + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. + open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? + + /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and + /// requires the caller to call the `completionHandler`. + open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. + open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and + /// requires the caller to call the `completionHandler`. + open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. + open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? + + /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and + /// requires the caller to call the `completionHandler`. + open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. + open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. + open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? + + // MARK: URLSessionDataDelegate Overrides + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. + open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? + + /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and + /// requires caller to call the `completionHandler`. + open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. + open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. + open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. + open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? + + /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and + /// requires caller to call the `completionHandler`. + open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? + + // MARK: URLSessionDownloadDelegate Overrides + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. + open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. + open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. + open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? + + // MARK: URLSessionStreamDelegate Overrides + +#if !os(watchOS) + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? { + get { + return _streamTaskReadClosed as? (URLSession, URLSessionStreamTask) -> Void + } + set { + _streamTaskReadClosed = newValue + } + } + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? { + get { + return _streamTaskWriteClosed as? (URLSession, URLSessionStreamTask) -> Void + } + set { + _streamTaskWriteClosed = newValue + } + } + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? { + get { + return _streamTaskBetterRouteDiscovered as? (URLSession, URLSessionStreamTask) -> Void + } + set { + _streamTaskBetterRouteDiscovered = newValue + } + } + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? { + get { + return _streamTaskDidBecomeInputStream as? (URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void + } + set { + _streamTaskDidBecomeInputStream = newValue + } + } + + var _streamTaskReadClosed: Any? + var _streamTaskWriteClosed: Any? + var _streamTaskBetterRouteDiscovered: Any? + var _streamTaskDidBecomeInputStream: Any? + +#endif + + // MARK: Properties + + var retrier: RequestRetrier? + weak var sessionManager: SessionManager? + + var requests: [Int: Request] = [:] + private let lock = NSLock() + + /// Access the task delegate for the specified task in a thread-safe manner. + open subscript(task: URLSessionTask) -> Request? { + get { + lock.lock() ; defer { lock.unlock() } + return requests[task.taskIdentifier] + } + set { + lock.lock() ; defer { lock.unlock() } + requests[task.taskIdentifier] = newValue + } + } + + // MARK: Lifecycle + + /// Initializes the `SessionDelegate` instance. + /// + /// - returns: The new `SessionDelegate` instance. + public override init() { + super.init() + } + + // MARK: NSObject Overrides + + /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond + /// to a specified message. + /// + /// - parameter selector: A selector that identifies a message. + /// + /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. + open override func responds(to selector: Selector) -> Bool { + #if !os(macOS) + if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { + return sessionDidFinishEventsForBackgroundURLSession != nil + } + #endif + + #if !os(watchOS) + if #available(iOS 9.0, macOS 10.11, tvOS 9.0, *) { + switch selector { + case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): + return streamTaskReadClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): + return streamTaskWriteClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): + return streamTaskBetterRouteDiscovered != nil + case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): + return streamTaskDidBecomeInputAndOutputStreams != nil + default: + break + } + } + #endif + + switch selector { + case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): + return sessionDidBecomeInvalidWithError != nil + case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): + return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) + case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): + return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) + case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): + return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) + default: + return type(of: self).instancesRespond(to: selector) + } + } +} + +// MARK: - URLSessionDelegate + +extension SessionDelegate: URLSessionDelegate { + /// Tells the delegate that the session has been invalidated. + /// + /// - parameter session: The session object that was invalidated. + /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. + open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { + sessionDidBecomeInvalidWithError?(session, error) + } + + /// Requests credentials from the delegate in response to a session-level authentication request from the + /// remote server. + /// + /// - parameter session: The session containing the task that requested authentication. + /// - parameter challenge: An object that contains the request for authentication. + /// - parameter completionHandler: A handler that your delegate method must call providing the disposition + /// and credential. + open func urlSession( + _ session: URLSession, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + guard sessionDidReceiveChallengeWithCompletion == nil else { + sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) + return + } + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + var credential: URLCredential? + + if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { + (disposition, credential) = sessionDidReceiveChallenge(session, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if + let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + let serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluate(serverTrust, forHost: host) { + disposition = .useCredential + credential = URLCredential(trust: serverTrust) + } else { + disposition = .cancelAuthenticationChallenge + } + } + } + + completionHandler(disposition, credential) + } + +#if !os(macOS) + + /// Tells the delegate that all messages enqueued for a session have been delivered. + /// + /// - parameter session: The session that no longer has any outstanding requests. + open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { + sessionDidFinishEventsForBackgroundURLSession?(session) + } + +#endif +} + +// MARK: - URLSessionTaskDelegate + +extension SessionDelegate: URLSessionTaskDelegate { + /// Tells the delegate that the remote server requested an HTTP redirect. + /// + /// - parameter session: The session containing the task whose request resulted in a redirect. + /// - parameter task: The task whose request resulted in a redirect. + /// - parameter response: An object containing the server’s response to the original request. + /// - parameter request: A URL request object filled out with the new location. + /// - parameter completionHandler: A closure that your handler should call with either the value of the request + /// parameter, a modified URL request object, or NULL to refuse the redirect and + /// return the body of the redirect response. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) { + guard taskWillPerformHTTPRedirectionWithCompletion == nil else { + taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) + return + } + + var redirectRequest: URLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + /// Requests credentials from the delegate in response to an authentication request from the remote server. + /// + /// - parameter session: The session containing the task whose request requires authentication. + /// - parameter task: The task whose request requires authentication. + /// - parameter challenge: An object that contains the request for authentication. + /// - parameter completionHandler: A handler that your delegate method must call providing the disposition + /// and credential. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + guard taskDidReceiveChallengeWithCompletion == nil else { + taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) + return + } + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + let result = taskDidReceiveChallenge(session, task, challenge) + completionHandler(result.0, result.1) + } else if let delegate = self[task]?.delegate { + delegate.urlSession( + session, + task: task, + didReceive: challenge, + completionHandler: completionHandler + ) + } else { + urlSession(session, didReceive: challenge, completionHandler: completionHandler) + } + } + + /// Tells the delegate when a task requires a new request body stream to send to the remote server. + /// + /// - parameter session: The session containing the task that needs a new body stream. + /// - parameter task: The task that needs a new body stream. + /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { + guard taskNeedNewBodyStreamWithCompletion == nil else { + taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) + return + } + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + completionHandler(taskNeedNewBodyStream(session, task)) + } else if let delegate = self[task]?.delegate { + delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) + } + } + + /// Periodically informs the delegate of the progress of sending body content to the server. + /// + /// - parameter session: The session containing the data task. + /// - parameter task: The data task. + /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. + /// - parameter totalBytesSent: The total number of bytes sent so far. + /// - parameter totalBytesExpectedToSend: The expected length of the body data. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) { + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { + delegate.URLSession( + session, + task: task, + didSendBodyData: bytesSent, + totalBytesSent: totalBytesSent, + totalBytesExpectedToSend: totalBytesExpectedToSend + ) + } + } + +#if !os(watchOS) + + /// Tells the delegate that the session finished collecting metrics for the task. + /// + /// - parameter session: The session collecting the metrics. + /// - parameter task: The task whose metrics have been collected. + /// - parameter metrics: The collected metrics. + @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) + @objc(URLSession:task:didFinishCollectingMetrics:) + open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { + self[task]?.delegate.metrics = metrics + } + +#endif + + /// Tells the delegate that the task finished transferring data. + /// + /// - parameter session: The session containing the task whose request finished transferring data. + /// - parameter task: The task whose request finished transferring data. + /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. + open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + /// Executed after it is determined that the request is not going to be retried + let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in + guard let strongSelf = self else { return } + + strongSelf.taskDidComplete?(session, task, error) + + strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) + + var userInfo: [String: Any] = [Notification.Key.Task: task] + + if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data { + userInfo[Notification.Key.ResponseData] = data + } + + NotificationCenter.default.post( + name: Notification.Name.Task.DidComplete, + object: strongSelf, + userInfo: userInfo + ) + + strongSelf[task] = nil + } + + guard let request = self[task], let sessionManager = sessionManager else { + completeTask(session, task, error) + return + } + + // Run all validations on the request before checking if an error occurred + request.validations.forEach { $0() } + + // Determine whether an error has occurred + var error: Error? = error + + if request.delegate.error != nil { + error = request.delegate.error + } + + /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request + /// should be retried. Otherwise, complete the task by notifying the task delegate. + if let retrier = retrier, let error = error { + retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in + guard shouldRetry else { completeTask(session, task, error) ; return } + + DispatchQueue.utility.after(timeDelay) { [weak self] in + guard let strongSelf = self else { return } + + let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false + + if retrySucceeded, let task = request.task { + strongSelf[task] = request + return + } else { + completeTask(session, task, error) + } + } + } + } else { + completeTask(session, task, error) + } + } +} + +// MARK: - URLSessionDataDelegate + +extension SessionDelegate: URLSessionDataDelegate { + /// Tells the delegate that the data task received the initial reply (headers) from the server. + /// + /// - parameter session: The session containing the data task that received an initial reply. + /// - parameter dataTask: The data task that received an initial reply. + /// - parameter response: A URL response object populated with headers. + /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a + /// constant to indicate whether the transfer should continue as a data task or + /// should become a download task. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didReceive response: URLResponse, + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { + guard dataTaskDidReceiveResponseWithCompletion == nil else { + dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) + return + } + + var disposition: URLSession.ResponseDisposition = .allow + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + /// Tells the delegate that the data task was changed to a download task. + /// + /// - parameter session: The session containing the task that was replaced by a download task. + /// - parameter dataTask: The data task that was replaced by a download task. + /// - parameter downloadTask: The new download task that replaced the data task. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didBecome downloadTask: URLSessionDownloadTask) { + if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { + dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) + } else { + self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) + } + } + + /// Tells the delegate that the data task has received some of the expected data. + /// + /// - parameter session: The session containing the data task that provided data. + /// - parameter dataTask: The data task that provided data. + /// - parameter data: A data object containing the transferred data. + open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { + delegate.urlSession(session, dataTask: dataTask, didReceive: data) + } + } + + /// Asks the delegate whether the data (or upload) task should store the response in the cache. + /// + /// - parameter session: The session containing the data (or upload) task. + /// - parameter dataTask: The data (or upload) task. + /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current + /// caching policy and the values of certain received headers, such as the Pragma + /// and Cache-Control headers. + /// - parameter completionHandler: A block that your handler must call, providing either the original proposed + /// response, a modified version of that response, or NULL to prevent caching the + /// response. If your delegate implements this method, it must call this completion + /// handler; otherwise, your app leaks memory. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) { + guard dataTaskWillCacheResponseWithCompletion == nil else { + dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) + return + } + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) + } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { + delegate.urlSession( + session, + dataTask: dataTask, + willCacheResponse: proposedResponse, + completionHandler: completionHandler + ) + } else { + completionHandler(proposedResponse) + } + } +} + +// MARK: - URLSessionDownloadDelegate + +extension SessionDelegate: URLSessionDownloadDelegate { + /// Tells the delegate that a download task has finished downloading. + /// + /// - parameter session: The session containing the download task that finished. + /// - parameter downloadTask: The download task that finished. + /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either + /// open the file for reading or move it to a permanent location in your app’s sandbox + /// container directory before returning from this delegate method. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didFinishDownloadingTo location: URL) { + if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { + downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) + } + } + + /// Periodically informs the delegate about the download’s progress. + /// + /// - parameter session: The session containing the download task. + /// - parameter downloadTask: The download task. + /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate + /// method was called. + /// - parameter totalBytesWritten: The total number of bytes transferred so far. + /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length + /// header. If this header was not provided, the value is + /// `NSURLSessionTransferSizeUnknown`. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) { + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession( + session, + downloadTask: downloadTask, + didWriteData: bytesWritten, + totalBytesWritten: totalBytesWritten, + totalBytesExpectedToWrite: totalBytesExpectedToWrite + ) + } + } + + /// Tells the delegate that the download task has resumed downloading. + /// + /// - parameter session: The session containing the download task that finished. + /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. + /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the + /// existing content, then this value is zero. Otherwise, this value is an + /// integer representing the number of bytes on disk that do not need to be + /// retrieved again. + /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. + /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession( + session, + downloadTask: downloadTask, + didResumeAtOffset: fileOffset, + expectedTotalBytes: expectedTotalBytes + ) + } + } +} + +// MARK: - URLSessionStreamDelegate + +#if !os(watchOS) + +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) +extension SessionDelegate: URLSessionStreamDelegate { + /// Tells the delegate that the read side of the connection has been closed. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { + streamTaskReadClosed?(session, streamTask) + } + + /// Tells the delegate that the write side of the connection has been closed. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { + streamTaskWriteClosed?(session, streamTask) + } + + /// Tells the delegate that the system has determined that a better route to the host is available. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { + streamTaskBetterRouteDiscovered?(session, streamTask) + } + + /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + /// - parameter inputStream: The new input stream. + /// - parameter outputStream: The new output stream. + open func urlSession( + _ session: URLSession, + streamTask: URLSessionStreamTask, + didBecome inputStream: InputStream, + outputStream: OutputStream) { + streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) + } +} + +#endif diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift new file mode 100644 index 000000000000..19725f287e0c --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift @@ -0,0 +1,886 @@ +// +// SessionManager.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. +open class SessionManager { + + // MARK: - Helper Types + + /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as + /// associated values. + /// + /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with + /// streaming information. + /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding + /// error. + public enum MultipartFormDataEncodingResult { + case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) + case failure(Error) + } + + // MARK: - Properties + + /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use + /// directly for any ad hoc requests. + public static let `default`: SessionManager = { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders + + return SessionManager(configuration: configuration) + }() + + /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. + public static let defaultHTTPHeaders: HTTPHeaders = { + // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 + let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" + + // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 + let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in + let quality = 1.0 - (Double(index) * 0.1) + return "\(languageCode);q=\(quality)" + }.joined(separator: ", ") + + // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 + // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` + let userAgent: String = { + if let info = Bundle.main.infoDictionary { + let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" + let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" + let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" + let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" + + let osNameVersion: String = { + let version = ProcessInfo.processInfo.operatingSystemVersion + let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" + + let osName: String = { + #if os(iOS) + return "iOS" + #elseif os(watchOS) + return "watchOS" + #elseif os(tvOS) + return "tvOS" + #elseif os(macOS) + return "OS X" + #elseif os(Linux) + return "Linux" + #else + return "Unknown" + #endif + }() + + return "\(osName) \(versionString)" + }() + + let alamofireVersion: String = { + guard + let afInfo = Bundle(for: SessionManager.self).infoDictionary, + let build = afInfo["CFBundleShortVersionString"] + else { return "Unknown" } + + return "Alamofire/\(build)" + }() + + return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" + } + + return "Alamofire" + }() + + return [ + "Accept-Encoding": acceptEncoding, + "Accept-Language": acceptLanguage, + "User-Agent": userAgent + ] + }() + + /// Default memory threshold used when encoding `MultipartFormData` in bytes. + public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 + + /// The underlying session. + public let session: URLSession + + /// The session delegate handling all the task and session delegate callbacks. + public let delegate: SessionDelegate + + /// Whether to start requests immediately after being constructed. `true` by default. + open var startRequestsImmediately: Bool = true + + /// The request adapter called each time a new request is created. + open var adapter: RequestAdapter? + + /// The request retrier called each time a request encounters an error to determine whether to retry the request. + open var retrier: RequestRetrier? { + get { return delegate.retrier } + set { delegate.retrier = newValue } + } + + /// The background completion handler closure provided by the UIApplicationDelegate + /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background + /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation + /// will automatically call the handler. + /// + /// If you need to handle your own events before the handler is called, then you need to override the + /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. + /// + /// `nil` by default. + open var backgroundCompletionHandler: (() -> Void)? + + let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) + + // MARK: - Lifecycle + + /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. + /// + /// - parameter configuration: The configuration used to construct the managed session. + /// `URLSessionConfiguration.default` by default. + /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by + /// default. + /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + /// challenges. `nil` by default. + /// + /// - returns: The new `SessionManager` instance. + public init( + configuration: URLSessionConfiguration = URLSessionConfiguration.default, + delegate: SessionDelegate = SessionDelegate(), + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { + self.delegate = delegate + self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. + /// + /// - parameter session: The URL session. + /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. + /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + /// challenges. `nil` by default. + /// + /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. + public init?( + session: URLSession, + delegate: SessionDelegate, + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { + guard delegate === session.delegate else { return nil } + + self.delegate = delegate + self.session = session + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { + session.serverTrustPolicyManager = serverTrustPolicyManager + + delegate.sessionManager = self + + delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in + guard let strongSelf = self else { return } + DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } + } + } + + deinit { + session.invalidateAndCancel() + } + + // MARK: - Data Request + + /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` + /// and `headers`. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.get` by default. + /// - parameter parameters: The parameters. `nil` by default. + /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `DataRequest`. + @discardableResult + open func request( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil) + -> DataRequest { + var originalRequest: URLRequest? + + do { + originalRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(originalRequest!, with: parameters) + return request(encodedURLRequest) + } catch { + return request(originalRequest, failedWith: error) + } + } + + /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `DataRequest`. + @discardableResult + open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + var originalRequest: URLRequest? + + do { + originalRequest = try urlRequest.asURLRequest() + let originalTask = DataRequest.Requestable(urlRequest: originalRequest!) + + let task = try originalTask.task(session: session, adapter: adapter, queue: queue) + let request = DataRequest(session: session, requestTask: .data(originalTask, task)) + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return request(originalRequest, failedWith: error) + } + } + + // MARK: Private - Request Implementation + + private func request(_ urlRequest: URLRequest?, failedWith error: Error) -> DataRequest { + var requestTask: Request.RequestTask = .data(nil, nil) + + if let urlRequest = urlRequest { + let originalTask = DataRequest.Requestable(urlRequest: urlRequest) + requestTask = .data(originalTask, nil) + } + + let underlyingError = error.underlyingAdaptError ?? error + let request = DataRequest(session: session, requestTask: requestTask, error: underlyingError) + + if let retrier = retrier, error is AdaptError { + allowRetrier(retrier, toRetry: request, with: underlyingError) + } else { + if startRequestsImmediately { request.resume() } + } + + return request + } + + // MARK: - Download Request + + // MARK: URL Request + + /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, + /// `headers` and save them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.get` by default. + /// - parameter parameters: The parameters. `nil` by default. + /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) + return download(encodedURLRequest, to: destination) + } catch { + return download(nil, to: destination, failedWith: error) + } + } + + /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save + /// them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter urlRequest: The URL request + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + _ urlRequest: URLRequestConvertible, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return download(.request(urlRequest), to: destination) + } catch { + return download(nil, to: destination, failedWith: error) + } + } + + // MARK: Resume Data + + /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve + /// the contents of the original request and save them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken + /// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the + /// data is written incorrectly and will always fail to resume the download. For more information about the bug and + /// possible workarounds, please refer to the following Stack Overflow post: + /// + /// - http://stackoverflow.com/a/39347461/1342462 + /// + /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` + /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for + /// additional information. + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + resumingWith resumeData: Data, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest { + return download(.resumeData(resumeData), to: destination) + } + + // MARK: Private - Download Implementation + + private func download( + _ downloadable: DownloadRequest.Downloadable, + to destination: DownloadRequest.DownloadFileDestination?) + -> DownloadRequest { + do { + let task = try downloadable.task(session: session, adapter: adapter, queue: queue) + let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) + + download.downloadDelegate.destination = destination + + delegate[task] = download + + if startRequestsImmediately { download.resume() } + + return download + } catch { + return download(downloadable, to: destination, failedWith: error) + } + } + + private func download( + _ downloadable: DownloadRequest.Downloadable?, + to destination: DownloadRequest.DownloadFileDestination?, + failedWith error: Error) + -> DownloadRequest { + var downloadTask: Request.RequestTask = .download(nil, nil) + + if let downloadable = downloadable { + downloadTask = .download(downloadable, nil) + } + + let underlyingError = error.underlyingAdaptError ?? error + + let download = DownloadRequest(session: session, requestTask: downloadTask, error: underlyingError) + download.downloadDelegate.destination = destination + + if let retrier = retrier, error is AdaptError { + allowRetrier(retrier, toRetry: download, with: underlyingError) + } else { + if startRequestsImmediately { download.resume() } + } + + return download + } + + // MARK: - Upload Request + + // MARK: File + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter file: The file to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ fileURL: URL, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(fileURL, with: urlRequest) + } catch { + return upload(nil, failedWith: error) + } + } + + /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter file: The file to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.file(fileURL, urlRequest)) + } catch { + return upload(nil, failedWith: error) + } + } + + // MARK: Data + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter data: The data to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ data: Data, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(data, with: urlRequest) + } catch { + return upload(nil, failedWith: error) + } + } + + /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter data: The data to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.data(data, urlRequest)) + } catch { + return upload(nil, failedWith: error) + } + } + + // MARK: InputStream + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter stream: The stream to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ stream: InputStream, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(stream, with: urlRequest) + } catch { + return upload(nil, failedWith: error) + } + } + + /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter stream: The stream to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.stream(stream, urlRequest)) + } catch { + return upload(nil, failedWith: error) + } + } + + // MARK: MultipartFormData + + /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new + /// `UploadRequest` using the `url`, `method` and `headers`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + /// `multipartFormDataEncodingMemoryThreshold` by default. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + open func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + queue: DispatchQueue? = nil, + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + + return upload( + multipartFormData: multipartFormData, + usingThreshold: encodingMemoryThreshold, + with: urlRequest, + queue: queue, + encodingCompletion: encodingCompletion + ) + } catch { + (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } + } + } + + /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new + /// `UploadRequest` using the `urlRequest`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + /// `multipartFormDataEncodingMemoryThreshold` by default. + /// - parameter urlRequest: The URL request. + /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + open func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + with urlRequest: URLRequestConvertible, + queue: DispatchQueue? = nil, + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { + DispatchQueue.global(qos: .utility).async { + let formData = MultipartFormData() + multipartFormData(formData) + + var tempFileURL: URL? + + do { + var urlRequestWithContentType = try urlRequest.asURLRequest() + urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") + + let isBackgroundSession = self.session.configuration.identifier != nil + + if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { + let data = try formData.encode() + + let encodingResult = MultipartFormDataEncodingResult.success( + request: self.upload(data, with: urlRequestWithContentType), + streamingFromDisk: false, + streamFileURL: nil + ) + + (queue ?? DispatchQueue.main).async { encodingCompletion?(encodingResult) } + } else { + let fileManager = FileManager.default + let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) + let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") + let fileName = UUID().uuidString + let fileURL = directoryURL.appendingPathComponent(fileName) + + tempFileURL = fileURL + + var directoryError: Error? + + // Create directory inside serial queue to ensure two threads don't do this in parallel + self.queue.sync { + do { + try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) + } catch { + directoryError = error + } + } + + if let directoryError = directoryError { throw directoryError } + + try formData.writeEncodedData(to: fileURL) + + let upload = self.upload(fileURL, with: urlRequestWithContentType) + + // Cleanup the temp file once the upload is complete + upload.delegate.queue.addOperation { + do { + try FileManager.default.removeItem(at: fileURL) + } catch { + // No-op + } + } + + (queue ?? DispatchQueue.main).async { + let encodingResult = MultipartFormDataEncodingResult.success( + request: upload, + streamingFromDisk: true, + streamFileURL: fileURL + ) + + encodingCompletion?(encodingResult) + } + } + } catch { + // Cleanup the temp file in the event that the multipart form data encoding failed + if let tempFileURL = tempFileURL { + do { + try FileManager.default.removeItem(at: tempFileURL) + } catch { + // No-op + } + } + + (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } + } + } + } + + // MARK: Private - Upload Implementation + + private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { + do { + let task = try uploadable.task(session: session, adapter: adapter, queue: queue) + let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) + + if case let .stream(inputStream, _) = uploadable { + upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } + } + + delegate[task] = upload + + if startRequestsImmediately { upload.resume() } + + return upload + } catch { + return upload(uploadable, failedWith: error) + } + } + + private func upload(_ uploadable: UploadRequest.Uploadable?, failedWith error: Error) -> UploadRequest { + var uploadTask: Request.RequestTask = .upload(nil, nil) + + if let uploadable = uploadable { + uploadTask = .upload(uploadable, nil) + } + + let underlyingError = error.underlyingAdaptError ?? error + let upload = UploadRequest(session: session, requestTask: uploadTask, error: underlyingError) + + if let retrier = retrier, error is AdaptError { + allowRetrier(retrier, toRetry: upload, with: underlyingError) + } else { + if startRequestsImmediately { upload.resume() } + } + + return upload + } + +#if !os(watchOS) + + // MARK: - Stream Request + + // MARK: Hostname and Port + + /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter hostName: The hostname of the server to connect to. + /// - parameter port: The port of the server to connect to. + /// + /// - returns: The created `StreamRequest`. + @discardableResult + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open func stream(withHostName hostName: String, port: Int) -> StreamRequest { + return stream(.stream(hostName: hostName, port: port)) + } + + // MARK: NetService + + /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter netService: The net service used to identify the endpoint. + /// + /// - returns: The created `StreamRequest`. + @discardableResult + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open func stream(with netService: NetService) -> StreamRequest { + return stream(.netService(netService)) + } + + // MARK: Private - Stream Implementation + + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { + do { + let task = try streamable.task(session: session, adapter: adapter, queue: queue) + let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return stream(failedWith: error) + } + } + + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + private func stream(failedWith error: Error) -> StreamRequest { + let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) + if startRequestsImmediately { stream.resume() } + return stream + } + +#endif + + // MARK: - Internal - Retry Request + + func retry(_ request: Request) -> Bool { + guard let originalTask = request.originalTask else { return false } + + do { + let task = try originalTask.task(session: session, adapter: adapter, queue: queue) + + if let originalTask = request.task { + delegate[originalTask] = nil // removes the old request to avoid endless growth + } + + request.delegate.task = task // resets all task delegate data + + request.retryCount += 1 + request.startTime = CFAbsoluteTimeGetCurrent() + request.endTime = nil + + task.resume() + + return true + } catch { + request.delegate.error = error.underlyingAdaptError ?? error + return false + } + } + + private func allowRetrier(_ retrier: RequestRetrier, toRetry request: Request, with error: Error) { + DispatchQueue.utility.async { [weak self] in + guard let strongSelf = self else { return } + + retrier.should(strongSelf, retry: request, with: error) { shouldRetry, timeDelay in + guard let strongSelf = self else { return } + + guard shouldRetry else { + if strongSelf.startRequestsImmediately { request.resume() } + return + } + + DispatchQueue.utility.after(timeDelay) { + guard let strongSelf = self else { return } + + let retrySucceeded = strongSelf.retry(request) + + if retrySucceeded, let task = request.task { + strongSelf.delegate[task] = request + } else { + if strongSelf.startRequestsImmediately { request.resume() } + } + } + } + } + } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift new file mode 100644 index 000000000000..a25d80271d31 --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift @@ -0,0 +1,456 @@ +// +// TaskDelegate.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +/// executing all operations attached to the serial operation queue upon task completion. +open class TaskDelegate: NSObject { + + // MARK: Properties + + /// The serial operation queue used to execute all operations after the task completes. + public let queue: OperationQueue + + /// The data returned by the server. + public var data: Data? { return nil } + + /// The error generated throughout the lifecyle of the task. + public var error: Error? + + var task: URLSessionTask? { + set { + taskLock.lock(); defer { taskLock.unlock() } + _task = newValue + } + get { + taskLock.lock(); defer { taskLock.unlock() } + return _task + } + } + + var initialResponseTime: CFAbsoluteTime? + var credential: URLCredential? + var metrics: AnyObject? // URLSessionTaskMetrics + + private var _task: URLSessionTask? { + didSet { reset() } + } + + private let taskLock = NSLock() + + // MARK: Lifecycle + + init(task: URLSessionTask?) { + _task = task + + self.queue = { + let operationQueue = OperationQueue() + + operationQueue.maxConcurrentOperationCount = 1 + operationQueue.isSuspended = true + operationQueue.qualityOfService = .utility + + return operationQueue + }() + } + + func reset() { + error = nil + initialResponseTime = nil + } + + // MARK: URLSessionTaskDelegate + + var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? + var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? + + @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) { + var redirectRequest: URLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + @objc(URLSession:task:didReceiveChallenge:completionHandler:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if + let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + let serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluate(serverTrust, forHost: host) { + disposition = .useCredential + credential = URLCredential(trust: serverTrust) + } else { + disposition = .cancelAuthenticationChallenge + } + } + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } + + @objc(URLSession:task:needNewBodyStream:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { + var bodyStream: InputStream? + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + bodyStream = taskNeedNewBodyStream(session, task) + } + + completionHandler(bodyStream) + } + + @objc(URLSession:task:didCompleteWithError:) + func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + if let taskDidCompleteWithError = taskDidCompleteWithError { + taskDidCompleteWithError(session, task, error) + } else { + if let error = error { + if self.error == nil { self.error = error } + + if + let downloadDelegate = self as? DownloadTaskDelegate, + let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data + { + downloadDelegate.resumeData = resumeData + } + } + + queue.isSuspended = false + } + } +} + +// MARK: - + +class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { + + // MARK: Properties + + var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } + + override var data: Data? { + if dataStream != nil { + return nil + } else { + return mutableData + } + } + + var progress: Progress + var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + var dataStream: ((_ data: Data) -> Void)? + + private var totalBytesReceived: Int64 = 0 + private var mutableData: Data + + private var expectedContentLength: Int64? + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + mutableData = Data() + progress = Progress(totalUnitCount: 0) + + super.init(task: task) + } + + override func reset() { + super.reset() + + progress = Progress(totalUnitCount: 0) + totalBytesReceived = 0 + mutableData = Data() + expectedContentLength = nil + } + + // MARK: URLSessionDataDelegate + + var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? + var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? + var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? + var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didReceive response: URLResponse, + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { + var disposition: URLSession.ResponseDisposition = .allow + + expectedContentLength = response.expectedContentLength + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didBecome downloadTask: URLSessionDownloadTask) { + dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) + } + + func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else { + if let dataStream = dataStream { + dataStream(data) + } else { + mutableData.append(data) + } + + let bytesReceived = Int64(data.count) + totalBytesReceived += bytesReceived + let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + + progress.totalUnitCount = totalBytesExpected + progress.completedUnitCount = totalBytesReceived + + if let progressHandler = progressHandler { + progressHandler.queue.async { progressHandler.closure(self.progress) } + } + } + } + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) { + var cachedResponse: CachedURLResponse? = proposedResponse + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) + } + + completionHandler(cachedResponse) + } +} + +// MARK: - + +class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { + + // MARK: Properties + + var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } + + var progress: Progress + var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + var resumeData: Data? + override var data: Data? { return resumeData } + + var destination: DownloadRequest.DownloadFileDestination? + + var temporaryURL: URL? + var destinationURL: URL? + + var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + progress = Progress(totalUnitCount: 0) + super.init(task: task) + } + + override func reset() { + super.reset() + + progress = Progress(totalUnitCount: 0) + resumeData = nil + } + + // MARK: URLSessionDownloadDelegate + + var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? + var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didFinishDownloadingTo location: URL) { + temporaryURL = location + + guard + let destination = destination, + let response = downloadTask.response as? HTTPURLResponse + else { return } + + let result = destination(location, response) + let destinationURL = result.destinationURL + let options = result.options + + self.destinationURL = destinationURL + + do { + if options.contains(.removePreviousFile), FileManager.default.fileExists(atPath: destinationURL.path) { + try FileManager.default.removeItem(at: destinationURL) + } + + if options.contains(.createIntermediateDirectories) { + let directory = destinationURL.deletingLastPathComponent() + try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) + } + + try FileManager.default.moveItem(at: location, to: destinationURL) + } catch { + self.error = error + } + } + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData( + session, + downloadTask, + bytesWritten, + totalBytesWritten, + totalBytesExpectedToWrite + ) + } else { + progress.totalUnitCount = totalBytesExpectedToWrite + progress.completedUnitCount = totalBytesWritten + + if let progressHandler = progressHandler { + progressHandler.queue.async { progressHandler.closure(self.progress) } + } + } + } + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else { + progress.totalUnitCount = expectedTotalBytes + progress.completedUnitCount = fileOffset + } + } +} + +// MARK: - + +class UploadTaskDelegate: DataTaskDelegate { + + // MARK: Properties + + var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } + + var uploadProgress: Progress + var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + uploadProgress = Progress(totalUnitCount: 0) + super.init(task: task) + } + + override func reset() { + super.reset() + uploadProgress = Progress(totalUnitCount: 0) + } + + // MARK: URLSessionTaskDelegate + + var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? + + func URLSession( + _ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else { + uploadProgress.totalUnitCount = totalBytesExpectedToSend + uploadProgress.completedUnitCount = totalBytesSent + + if let uploadProgressHandler = uploadProgressHandler { + uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } + } + } + } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift new file mode 100644 index 000000000000..2c27dd29f74b --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift @@ -0,0 +1,135 @@ +// +// Timeline.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. +public struct Timeline { + /// The time the request was initialized. + public let requestStartTime: CFAbsoluteTime + + /// The time the first bytes were received from or sent to the server. + public let initialResponseTime: CFAbsoluteTime + + /// The time when the request was completed. + public let requestCompletedTime: CFAbsoluteTime + + /// The time when the response serialization was completed. + public let serializationCompletedTime: CFAbsoluteTime + + /// The time interval in seconds from the time the request started to the initial response from the server. + public let latency: TimeInterval + + /// The time interval in seconds from the time the request started to the time the request completed. + public let requestDuration: TimeInterval + + /// The time interval in seconds from the time the request completed to the time response serialization completed. + public let serializationDuration: TimeInterval + + /// The time interval in seconds from the time the request started to the time response serialization completed. + public let totalDuration: TimeInterval + + /// Creates a new `Timeline` instance with the specified request times. + /// + /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. + /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. + /// Defaults to `0.0`. + /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. + /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults + /// to `0.0`. + /// + /// - returns: The new `Timeline` instance. + public init( + requestStartTime: CFAbsoluteTime = 0.0, + initialResponseTime: CFAbsoluteTime = 0.0, + requestCompletedTime: CFAbsoluteTime = 0.0, + serializationCompletedTime: CFAbsoluteTime = 0.0) { + self.requestStartTime = requestStartTime + self.initialResponseTime = initialResponseTime + self.requestCompletedTime = requestCompletedTime + self.serializationCompletedTime = serializationCompletedTime + + self.latency = initialResponseTime - requestStartTime + self.requestDuration = requestCompletedTime - requestStartTime + self.serializationDuration = serializationCompletedTime - requestCompletedTime + self.totalDuration = serializationCompletedTime - requestStartTime + } +} + +// MARK: - CustomStringConvertible + +extension Timeline: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes the latency, the request + /// duration and the total duration. + public var description: String { + let latency = String(format: "%.3f", self.latency) + let requestDuration = String(format: "%.3f", self.requestDuration) + let serializationDuration = String(format: "%.3f", self.serializationDuration) + let totalDuration = String(format: "%.3f", self.totalDuration) + + // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is + // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. + let timings = [ + "\"Latency\": " + latency + " secs", + "\"Request Duration\": " + requestDuration + " secs", + "\"Serialization Duration\": " + serializationDuration + " secs", + "\"Total Duration\": " + totalDuration + " secs" + ] + + return "Timeline: { " + timings.joined(separator: ", ") + " }" + } +} + +// MARK: - CustomDebugStringConvertible + +extension Timeline: CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes the request start time, the + /// initial response time, the request completed time, the serialization completed time, the latency, the request + /// duration and the total duration. + public var debugDescription: String { + let requestStartTime = String(format: "%.3f", self.requestStartTime) + let initialResponseTime = String(format: "%.3f", self.initialResponseTime) + let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) + let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) + let latency = String(format: "%.3f", self.latency) + let requestDuration = String(format: "%.3f", self.requestDuration) + let serializationDuration = String(format: "%.3f", self.serializationDuration) + let totalDuration = String(format: "%.3f", self.totalDuration) + + // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is + // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. + let timings = [ + "\"Request Start Time\": " + requestStartTime, + "\"Initial Response Time\": " + initialResponseTime, + "\"Request Completed Time\": " + requestCompletedTime, + "\"Serialization Completed Time\": " + serializationCompletedTime, + "\"Latency\": " + latency + " secs", + "\"Request Duration\": " + requestDuration + " secs", + "\"Serialization Duration\": " + serializationDuration + " secs", + "\"Total Duration\": " + totalDuration + " secs" + ] + + return "Timeline: { " + timings.joined(separator: ", ") + " }" + } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift new file mode 100644 index 000000000000..3c37e24d847f --- /dev/null +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift @@ -0,0 +1,319 @@ +// +// Validation.swift +// +// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Request { + + // MARK: Helper Types + + fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason + + /// Used to represent whether validation was successful or encountered an error resulting in a failure. + /// + /// - success: The validation was successful. + /// - failure: The validation failed encountering the provided error. + public enum ValidationResult { + case success + case failure(Error) + } + + fileprivate struct MIMEType { + let type: String + let subtype: String + + var isWildcard: Bool { return type == "*" && subtype == "*" } + + init?(_ string: String) { + let components: [String] = { + let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) + + #if swift(>=3.2) + let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] + #else + let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) + #endif + + return split.components(separatedBy: "/") + }() + + if let type = components.first, let subtype = components.last { + self.type = type + self.subtype = subtype + } else { + return nil + } + } + + func matches(_ mime: MIMEType) -> Bool { + switch (type, subtype) { + case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): + return true + default: + return false + } + } + } + + // MARK: Properties + + fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } + + fileprivate var acceptableContentTypes: [String] { + if let accept = request?.value(forHTTPHeaderField: "Accept") { + return accept.components(separatedBy: ",") + } + + return ["*/*"] + } + + // MARK: Status Code + + fileprivate func validate( + statusCode acceptableStatusCodes: S, + response: HTTPURLResponse) + -> ValidationResult + where S.Iterator.Element == Int { + if acceptableStatusCodes.contains(response.statusCode) { + return .success + } else { + let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) + return .failure(AFError.responseValidationFailed(reason: reason)) + } + } + + // MARK: Content Type + + fileprivate func validate( + contentType acceptableContentTypes: S, + response: HTTPURLResponse, + data: Data?) + -> ValidationResult + where S.Iterator.Element == String { + guard let data = data, data.count > 0 else { return .success } + + guard + let responseContentType = response.mimeType, + let responseMIMEType = MIMEType(responseContentType) + else { + for contentType in acceptableContentTypes { + if let mimeType = MIMEType(contentType), mimeType.isWildcard { + return .success + } + } + + let error: AFError = { + let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) + return AFError.responseValidationFailed(reason: reason) + }() + + return .failure(error) + } + + for contentType in acceptableContentTypes { + if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { + return .success + } + } + + let error: AFError = { + let reason: ErrorReason = .unacceptableContentType( + acceptableContentTypes: Array(acceptableContentTypes), + responseContentType: responseContentType + ) + + return AFError.responseValidationFailed(reason: reason) + }() + + return .failure(error) + } +} + +// MARK: - + +extension DataRequest { + /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the + /// request was valid. + public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult + + /// Validates the request, using the specified closure. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter validation: A closure to validate the request. + /// + /// - returns: The request. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validationExecution: () -> Void = { [unowned self] in + if + let response = self.response, + self.delegate.error == nil, + case let .failure(error) = validation(self.request, response, self.delegate.data) + { + self.delegate.error = error + } + } + + validations.append(validationExecution) + + return self + } + + /// Validates that the response has a status code in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter range: The range of acceptable status codes. + /// + /// - returns: The request. + @discardableResult + public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { + return validate { [unowned self] _, response, _ in + return self.validate(statusCode: acceptableStatusCodes, response: response) + } + } + + /// Validates that the response has a content type in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + /// + /// - returns: The request. + @discardableResult + public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + return validate { [unowned self] _, response, data in + return self.validate(contentType: acceptableContentTypes, response: response, data: data) + } + } + + /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content + /// type matches any specified in the Accept HTTP header field. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - returns: The request. + @discardableResult + public func validate() -> Self { + let contentTypes = { [unowned self] in + self.acceptableContentTypes + } + return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) + } +} + +// MARK: - + +extension DownloadRequest { + /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a + /// destination URL, and returns whether the request was valid. + public typealias Validation = ( + _ request: URLRequest?, + _ response: HTTPURLResponse, + _ temporaryURL: URL?, + _ destinationURL: URL?) + -> ValidationResult + + /// Validates the request, using the specified closure. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter validation: A closure to validate the request. + /// + /// - returns: The request. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validationExecution: () -> Void = { [unowned self] in + let request = self.request + let temporaryURL = self.downloadDelegate.temporaryURL + let destinationURL = self.downloadDelegate.destinationURL + + if + let response = self.response, + self.delegate.error == nil, + case let .failure(error) = validation(request, response, temporaryURL, destinationURL) + { + self.delegate.error = error + } + } + + validations.append(validationExecution) + + return self + } + + /// Validates that the response has a status code in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter range: The range of acceptable status codes. + /// + /// - returns: The request. + @discardableResult + public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { + return validate { [unowned self] _, response, _, _ in + return self.validate(statusCode: acceptableStatusCodes, response: response) + } + } + + /// Validates that the response has a content type in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + /// + /// - returns: The request. + @discardableResult + public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + return validate { [unowned self] _, response, _, _ in + let fileURL = self.downloadDelegate.fileURL + + guard let validFileURL = fileURL else { + return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) + } + + do { + let data = try Data(contentsOf: validFileURL) + return self.validate(contentType: acceptableContentTypes, response: response, data: data) + } catch { + return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) + } + } + } + + /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content + /// type matches any specified in the Accept HTTP header field. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - returns: The request. + @discardableResult + public func validate() -> Self { + let contentTypes = { [unowned self] in + self.acceptableContentTypes + } + return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) + } +} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift index b83a008b7921..c0c6a0332b4c 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift @@ -76,7 +76,9 @@ class DateFormatTests: XCTestCase { } func testCodableAlwaysResultsInUTCEncodedDate() { - let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)! + CodableHelper.jsonEncoder.outputFormatting.remove(.prettyPrinted) + + let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)! let decodeResult = CodableHelper.decode(DateTest.self, from: jsonData) XCTAssert(decodeResult.decodableObj != nil && decodeResult.error == nil) diff --git a/samples/client/petstore/swift4/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift4/nonPublicApi/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/nonPublicApi/Package.swift b/samples/client/petstore/swift4/nonPublicApi/Package.swift index e5c5f0f33b82..a847bc5077d1 100644 --- a/samples/client/petstore/swift4/nonPublicApi/Package.swift +++ b/samples/client/petstore/swift4/nonPublicApi/Package.swift @@ -9,11 +9,11 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -22,6 +22,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["Alamofire"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 8641eb7ebf77..93b30800826e 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation internal struct APIHelper { - internal static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + internal static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ internal struct APIHelper { return destination } - internal static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + internal static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - internal static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + internal static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ internal struct APIHelper { } internal static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - internal static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + internal static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ internal struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift index 82b62e32eb97..04afd1c37640 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,22 +9,23 @@ import Foundation internal class PetstoreClientAPI { internal static var basePath = "http://petstore.swagger.io:80/v2" internal static var credential: URLCredential? - internal static var customHeaders: [String: String] = [:] + internal static var customHeaders: [String:String] = [:] internal static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() + internal static var apiResponseQueue: DispatchQueue = .main } internal class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - internal let parameters: [String: Any]? + var headers: [String:String] + internal let parameters: [String:Any]? internal let isBody: Bool internal let method: String internal let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - internal var onProgressReady: ((Progress) -> Void)? + internal var onProgressReady: ((Progress) -> ())? - required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required internal init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -34,7 +35,7 @@ internal class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - internal func addHeaders(_ aHeaders: [String: String]) { + internal func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -57,5 +58,5 @@ internal class RequestBuilder { internal protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 9126bafa69ca..015f165c9f92 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class AnotherFakeAPI { /** To test special tags @@ -14,7 +16,7 @@ internal class AnotherFakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - internal class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + internal class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index c793f330e416..fa8cd0b76267 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,13 +7,15 @@ import Foundation + + internal class FakeAPI { /** - parameter body: (body) Input boolean as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + internal class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -42,7 +44,7 @@ internal class FakeAPI { - parameter body: (body) Input composite as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -71,7 +73,7 @@ internal class FakeAPI { - parameter body: (body) Input number as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + internal class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -100,7 +102,7 @@ internal class FakeAPI { - parameter body: (body) Input string as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + internal class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -129,8 +131,8 @@ internal class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - internal class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + internal class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -163,8 +165,8 @@ internal class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - internal class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + internal class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -186,7 +188,7 @@ internal class FakeAPI { var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query + "query": query.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -200,7 +202,7 @@ internal class FakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - internal class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + internal class func testClientModel(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -244,8 +246,8 @@ internal class FakeAPI { - parameter callback: (form) None (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + internal class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -280,26 +282,26 @@ internal class FakeAPI { internal class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), - "number": number, - "float": float, - "double": double, - "string": string, - "pattern_without_delimiter": patternWithoutDelimiter, - "byte": byte, - "binary": binary, + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), "date": date?.encodeToJSON(), "dateTime": dateTime?.encodeToJSON(), - "password": password, - "callback": callback + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -387,8 +389,8 @@ internal class FakeAPI { - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - parameter completion: completion handler to receive the data and the error objects */ - internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -414,24 +416,24 @@ internal class FakeAPI { internal class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray, - "enum_form_string": enumFormString?.rawValue + let formParams: [String:Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray, - "enum_query_string": enumQueryString?.rawValue, - "enum_query_integer": enumQueryInteger?.rawValue, - "enum_query_double": enumQueryDouble?.rawValue + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray, - "enum_header_string": enumHeaderString?.rawValue + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) @@ -451,8 +453,8 @@ internal class FakeAPI { - parameter int64Group: (query) Integer in group parameters (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -476,18 +478,18 @@ internal class FakeAPI { internal class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup, - "boolean_group": booleanGroup + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) @@ -502,8 +504,8 @@ internal class FakeAPI { - parameter param: (body) request body - parameter completion: completion handler to receive the data and the error objects */ - internal class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + internal class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -518,7 +520,7 @@ internal class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - internal class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + internal class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -537,8 +539,8 @@ internal class FakeAPI { - parameter param2: (form) field2 - parameter completion: completion handler to receive the data and the error objects */ - internal class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + internal class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -557,14 +559,14 @@ internal class FakeAPI { internal class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param, - "param2": param2 + let formParams: [String:Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index e4c221d8cb41..47ea5157ae2b 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + internal class FakeClassnameTags123API { /** To test class name in snake case @@ -14,7 +16,7 @@ internal class FakeClassnameTags123API { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - internal class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + internal class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 2e03efdebe7c..f290aaea0c50 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class PetAPI { /** Add a new pet to the store @@ -14,8 +16,8 @@ internal class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - internal class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + internal class func addPet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -52,8 +54,8 @@ internal class PetAPI { - parameter apiKey: (header) (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + internal class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -78,11 +80,11 @@ internal class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ - "api_key": apiKey + "api_key": apiKey?.encodeToJSON() ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) @@ -106,7 +108,7 @@ internal class PetAPI { - parameter status: (query) Status values that need to be considered for filter - parameter completion: completion handler to receive the data and the error objects */ - internal class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + internal class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in completion(response?.body, error) } @@ -125,11 +127,11 @@ internal class PetAPI { internal class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status + "status": status.encodeToJSON() ]) let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -143,7 +145,7 @@ internal class PetAPI { - parameter tags: (query) Tags to filter by - parameter completion: completion handler to receive the data and the error objects */ - internal class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + internal class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in completion(response?.body, error) } @@ -162,11 +164,11 @@ internal class PetAPI { internal class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags + "tags": tags.encodeToJSON() ]) let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -180,7 +182,7 @@ internal class PetAPI { - parameter petId: (path) ID of pet to return - parameter completion: completion handler to receive the data and the error objects */ - internal class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + internal class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -202,8 +204,8 @@ internal class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -217,8 +219,8 @@ internal class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - internal class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + internal class func updatePet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -256,8 +258,8 @@ internal class PetAPI { - parameter status: (form) Updated status of the pet (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -283,14 +285,14 @@ internal class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name, - "status": status + let formParams: [String:Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -306,7 +308,7 @@ internal class PetAPI { - parameter file: (form) file to upload (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in completion(response?.body, error) } @@ -329,14 +331,14 @@ internal class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -352,7 +354,7 @@ internal class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter completion: completion handler to receive the data and the error objects */ - internal class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + internal class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in completion(response?.body, error) } @@ -375,14 +377,14 @@ internal class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata, - "requiredFile": requiredFile + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index cfd546b9095f..cbf018279aca 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class StoreAPI { /** Delete purchase order by ID @@ -14,8 +16,8 @@ internal class StoreAPI { - parameter orderId: (path) ID of the order that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - internal class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + internal class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -37,8 +39,8 @@ internal class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -51,7 +53,7 @@ internal class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ - internal class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + internal class func getInventory(completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in completion(response?.body, error) } @@ -66,14 +68,14 @@ internal class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - internal class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + internal class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -84,7 +86,7 @@ internal class StoreAPI { - parameter orderId: (path) ID of pet that needs to be fetched - parameter completion: completion handler to receive the data and the error objects */ - internal class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + internal class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -103,8 +105,8 @@ internal class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -118,7 +120,7 @@ internal class StoreAPI { - parameter body: (body) order placed for purchasing the pet - parameter completion: completion handler to receive the data and the error objects */ - internal class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + internal class func placeOrder(body: Order, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 76067cbd42a0..7d85f91c685c 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class UserAPI { /** Create user @@ -14,8 +16,8 @@ internal class UserAPI { - parameter body: (body) Created user object - parameter completion: completion handler to receive the data and the error objects */ - internal class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + internal class func createUser(body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -49,8 +51,8 @@ internal class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - internal class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + internal class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -83,8 +85,8 @@ internal class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - internal class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + internal class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -117,8 +119,8 @@ internal class UserAPI { - parameter username: (path) The name that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - internal class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + internal class func deleteUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -140,8 +142,8 @@ internal class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -155,7 +157,7 @@ internal class UserAPI { - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - parameter completion: completion handler to receive the data and the error objects */ - internal class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + internal class func getUserByName(username: String, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in completion(response?.body, error) } @@ -173,8 +175,8 @@ internal class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -189,7 +191,7 @@ internal class UserAPI { - parameter password: (query) The password for login in clear text - parameter completion: completion handler to receive the data and the error objects */ - internal class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + internal class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in completion(response?.body, error) } @@ -206,12 +208,12 @@ internal class UserAPI { internal class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username, - "password": password + "username": username.encodeToJSON(), + "password": password.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -224,8 +226,8 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ - internal class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + internal class func logoutUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -242,8 +244,8 @@ internal class UserAPI { internal class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -258,8 +260,8 @@ internal class UserAPI { - parameter body: (body) Updated user object - parameter completion: completion handler to receive the data and the error objects */ - internal class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + internal class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index d1188c35a713..aef46f478f58 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() internal class AlamofireRequestBuilder: RequestBuilder { - required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required internal init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ internal class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - internal func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + internal func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override internal func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ internal class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -156,7 +157,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in + validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in cleanupRequest() if stringResponse.result.isFailure { @@ -176,7 +177,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { ) }) case is URL.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() do { @@ -226,7 +227,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { return }) case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in cleanupRequest() if voidResponse.result.isFailure { @@ -245,7 +246,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { ) }) default: - validatedRequest.responseData(completionHandler: { (dataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() if dataResponse.result.isFailure { @@ -275,7 +276,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ internal class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ internal enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -internal class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +internal class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -358,7 +359,7 @@ internal class AlamofireDecodableRequestBuilder: AlamofireRequestB switch T.self { case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in + validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in cleanupRequest() if stringResponse.result.isFailure { @@ -378,7 +379,7 @@ internal class AlamofireDecodableRequestBuilder: AlamofireRequestB ) }) case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in cleanupRequest() if voidResponse.result.isFailure { @@ -397,7 +398,7 @@ internal class AlamofireDecodableRequestBuilder: AlamofireRequestB ) }) case is Data.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() if dataResponse.result.isFailure { @@ -417,7 +418,7 @@ internal class AlamofireDecodableRequestBuilder: AlamofireRequestB ) }) default: - validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in cleanupRequest() guard dataResponse.result.isSuccess else { @@ -435,7 +436,7 @@ internal class AlamofireDecodableRequestBuilder: AlamofireRequestB return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index e17698e572c1..c0cfcf2343ec 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ internal typealias EncodeResult = (data: Data?, error: Error?) internal class CodableHelper { - internal static var dateformatter: DateFormatter? + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = { + let dateFormatter = DateFormatter() + dateFormatter.calendar = Calendar(identifier: .iso8601) + dateFormatter.locale = Locale(identifier: "en_US_POSIX") + dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) + dateFormatter.dateFormat = Configuration.dateFormat + return dateFormatter + }() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() - internal class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + internal static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + internal static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + internal static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + internal 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ internal class CodableHelper { return (returnedDecodable, returnedError) } - internal class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + internal class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift index bfcf939d4bb3..8cca45583256 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation internal class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. internal static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 84a3afa480d8..e6ecffbab5de 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -34,6 +34,10 @@ 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() @@ -64,22 +68,15 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any } -}() +} -extension Date: JSONEncodable { +extension URL: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return self } } @@ -111,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - internal mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + internal mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - internal mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + internal mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - internal mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + internal mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - internal mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + internal mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -138,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - internal func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + internal func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -150,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - internal func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + internal func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -160,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - internal func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + internal func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -174,3 +171,5 @@ extension KeyedDecodingContainerProtocol { } } + + diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index bd9f3a2ed0d5..cb5959f0fa43 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ internal struct JSONDataEncoding: ParameterEncoding { } internal static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 9330c4572543..22b34d0a00cc 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire internal class JSONEncodingHelper { - internal class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + internal class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ internal class JSONEncodingHelper { } internal class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ internal class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift index 5c253abc2c40..336c8848ba9d 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -internal enum ErrorResponse: Error { +internal enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ internal class Response { internal convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 203d2c1a931d..b708182c2e2d 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + internal struct AdditionalPropertiesClass: Codable { - internal var mapString: [String: String]? - internal var mapMapString: [String: [String: String]]? + internal var mapString: [String:String]? + internal var mapMapString: [String:[String:String]]? - internal init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + internal init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index ada7f86de509..a1ea3ef6cca0 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Animal: Codable { internal var className: String diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index 3ebe9e9a5dea..9c570350859f 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + internal typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index b60d8999b4b2..b229f5868b64 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + internal struct ApiResponse: Codable { internal var code: Int? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index ef26025dcd8f..2abe39f7ea89 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + internal struct ArrayOfArrayOfNumberOnly: Codable { internal var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ internal struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 1147e9394c72..595d04d352f2 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + internal struct ArrayOfNumberOnly: Codable { internal var arrayNumber: [Double]? @@ -15,7 +16,7 @@ internal struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index ffbc3ebc7367..1a0e3e90f582 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + internal struct ArrayTest: Codable { internal var arrayOfString: [String]? @@ -19,7 +20,7 @@ internal struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 52cdbb01be79..b036619b9339 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Capitalization: Codable { internal var smallCamel: String? @@ -26,7 +27,7 @@ internal struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 8a603dee5f1f..679fcc0357d1 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Cat: Codable { internal var className: String diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 45b7dbb26dcf..58f45d48e1bc 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + internal struct CatAllOf: Codable { internal var declawed: Bool? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 849bf788dfb3..4a0455e474da 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Category: Codable { internal var id: Int64? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index c9cb2dc710f8..0f1bc19fe595 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - internal struct ClassModel: Codable { internal var _class: String? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index ddee836043fa..8ef88c02834d 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Client: Codable { internal var client: String? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 6b5250de4a4a..60062138c763 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Dog: Codable { internal var className: String diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index ef3ff7f1d78b..a03d747850cc 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + internal struct DogAllOf: Codable { internal var breed: String? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index b84e5e2e1e2f..54384f7d3e23 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + internal struct EnumArrays: Codable { internal enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ internal struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 2520f9bd8593..432332510cfc 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + internal enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index eba9a8056efd..6717986da0c3 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + internal struct EnumTest: Codable { internal enum EnumString: String, Codable { @@ -41,7 +42,7 @@ internal struct EnumTest: Codable { self.outerEnum = outerEnum } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 2845c6bb4dbe..632402fb9e03 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - internal struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index e478e6c4b7d1..5540b5e6d1fb 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + internal struct FileSchemaTestClass: Codable { internal var file: File? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 23395c93b569..8976492cd669 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + internal struct FormatTest: Codable { internal var integer: Int? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 831963ba2ed2..179d626b6438 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + internal struct HasOnlyReadOnly: Codable { internal var bar: String? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift index ba9579996d19..6937817a62c5 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + internal struct List: Codable { internal var _123list: String? @@ -15,7 +16,7 @@ internal struct List: Codable { self._123list = _123list } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index f59541f76751..589ac492910d 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + internal struct MapTest: Codable { internal enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - internal var mapMapOfString: [String: [String: String]]? - internal var mapOfEnumString: [String: String]? - internal var directMap: [String: Bool]? + internal var mapMapOfString: [String:[String:String]]? + internal var mapOfEnumString: [String:String]? + internal var directMap: [String:Bool]? internal var indirectMap: StringBooleanMap? - internal init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + internal init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c71bb9256b0a..ab4634e3beb3 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable { internal var uuid: UUID? internal var dateTime: Date? - internal var map: [String: Animal]? + internal var map: [String:Animal]? - internal init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + internal init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index f0765ad5f0e9..01c3b342b5ce 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - internal struct Model200Response: Codable { internal var name: Int? @@ -19,7 +18,7 @@ internal struct Model200Response: Codable { self._class = _class } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index f0c7ab7def09..1b984c42d449 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - internal struct Name: Codable { internal var name: Int @@ -23,7 +22,7 @@ internal struct Name: Codable { self._123number = _123number } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 7dbe99f1426c..e60030be0ec2 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + internal struct NumberOnly: Codable { internal var justNumber: Double? @@ -15,7 +16,7 @@ internal struct NumberOnly: Codable { self.justNumber = justNumber } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 7f575485bf75..96c522f36350 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Order: Codable { internal enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 04fbad30ef76..a6d4cd98364b 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + internal struct OuterComposite: Codable { internal var myNumber: Double? @@ -19,7 +20,7 @@ internal struct OuterComposite: Codable { self.myBoolean = myBoolean } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index fd2d4b4cdda6..790fd71c13d5 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + internal enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 951f5929f922..4104dce89df9 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Pet: Codable { internal enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index d02c6cc5fd9f..0bcec482f28e 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + internal struct ReadOnlyFirst: Codable { internal var bar: String? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 943da8ff4537..8303fc95d1c1 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - internal struct Return: Codable { internal var _return: Int? @@ -17,7 +16,7 @@ internal struct Return: Codable { self._return = _return } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index b35724b1ca7a..993d472d0f3e 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + internal struct SpecialModelName: Codable { internal var specialPropertyName: Int64? @@ -15,7 +16,7 @@ internal struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index dc3d00e13014..7d465fa0f5d3 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + internal struct StringBooleanMap: Codable { - internal var additionalProperties: [String: Bool] = [:] + + internal var additionalProperties: [String:Bool] = [:] internal subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ internal struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 1e4de951fb2c..4dd149f0cc6d 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + internal struct Tag: Codable { internal var id: Int64? diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 0cff6b6a2f8b..6d911687757b 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + internal struct TypeHolderDefault: Codable { internal var stringItem: String = "what" @@ -23,7 +24,7 @@ internal struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 5d8f63dfe4ae..eeea24d466f7 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + internal struct TypeHolderExample: Codable { internal var stringItem: String @@ -23,7 +24,7 @@ internal struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - internal enum CodingKeys: String, CodingKey { + internal enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift index ada8a7f82d96..1840f84acf79 100644 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + internal struct User: Codable { internal var id: Int64? diff --git a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/Package.swift b/samples/client/petstore/swift4/objcCompatible/Package.swift index e5c5f0f33b82..a847bc5077d1 100644 --- a/samples/client/petstore/swift4/objcCompatible/Package.swift +++ b/samples/client/petstore/swift4/objcCompatible/Package.swift @@ -9,11 +9,11 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -22,6 +22,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["Alamofire"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 200070096800..d94614b34fc7 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift index 832282d224f8..13586cdadd87 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,23 +9,23 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -35,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -58,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 02e24286e3c8..1e6b7fc02c2c 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -14,7 +16,7 @@ open class AnotherFakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b0b394aa06e0..0bdeee0b2cb6 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,13 +7,15 @@ import Foundation + + open class FakeAPI { /** - parameter body: (body) Input boolean as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -42,7 +44,7 @@ open class FakeAPI { - parameter body: (body) Input composite as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -71,7 +73,7 @@ open class FakeAPI { - parameter body: (body) Input number as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -100,7 +102,7 @@ open class FakeAPI { - parameter body: (body) Input string as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -129,8 +131,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -163,8 +165,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -200,7 +202,7 @@ open class FakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -244,8 +246,8 @@ open class FakeAPI { - parameter callback: (form) None (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -280,7 +282,7 @@ open class FakeAPI { open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -299,7 +301,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -387,8 +389,8 @@ open class FakeAPI { - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -414,19 +416,19 @@ open class FakeAPI { open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "enum_form_string_array": enumFormStringArray?.encodeToJSON(), "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -451,8 +453,8 @@ open class FakeAPI { - parameter int64Group: (query) Integer in group parameters (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -476,13 +478,13 @@ open class FakeAPI { open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -502,8 +504,8 @@ open class FakeAPI { - parameter param: (body) request body - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -518,7 +520,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -537,8 +539,8 @@ open class FakeAPI { - parameter param2: (form) field2 - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -557,14 +559,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "param": param.encodeToJSON(), "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 060d434fbf24..822a371cef34 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -14,7 +16,7 @@ open class FakeClassnameTags123API { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index fe75962a72cf..cc4397947d1d 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -14,8 +16,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func addPet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -52,8 +54,8 @@ open class PetAPI { - parameter apiKey: (header) (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -78,8 +80,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -106,7 +108,7 @@ open class PetAPI { - parameter status: (query) Status values that need to be considered for filter - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in completion(response?.body, error) } @@ -125,8 +127,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -143,7 +145,7 @@ open class PetAPI { - parameter tags: (query) Tags to filter by - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in completion(response?.body, error) } @@ -162,8 +164,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -180,7 +182,7 @@ open class PetAPI { - parameter petId: (path) ID of pet to return - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -202,8 +204,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -217,8 +219,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -256,8 +258,8 @@ open class PetAPI { - parameter status: (form) Updated status of the pet (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -283,14 +285,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "name": name?.encodeToJSON(), "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -306,7 +308,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in completion(response?.body, error) } @@ -329,14 +331,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -352,7 +354,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in completion(response?.body, error) } @@ -375,14 +377,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index d5f627df52ac..b62f18f3f020 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -14,8 +16,8 @@ open class StoreAPI { - parameter orderId: (path) ID of the order that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -37,8 +39,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -51,7 +53,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in completion(response?.body, error) } @@ -66,14 +68,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -84,7 +86,7 @@ open class StoreAPI { - parameter orderId: (path) ID of pet that needs to be fetched - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -103,8 +105,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -118,7 +120,7 @@ open class StoreAPI { - parameter body: (body) order placed for purchasing the pet - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index ef4f971a91e2..0e2d140e037d 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -14,8 +16,8 @@ open class UserAPI { - parameter body: (body) Created user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUser(body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -49,8 +51,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -83,8 +85,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -117,8 +119,8 @@ open class UserAPI { - parameter username: (path) The name that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + open class func deleteUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -140,8 +142,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -155,7 +157,7 @@ open class UserAPI { - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in completion(response?.body, error) } @@ -173,8 +175,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -189,7 +191,7 @@ open class UserAPI { - parameter password: (query) The password for login in clear text - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in completion(response?.body, error) } @@ -206,11 +208,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -224,8 +226,8 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + open class func logoutUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -242,8 +244,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -258,8 +260,8 @@ open class UserAPI { - parameter body: (body) Updated user object - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 1d54e695608b..f8521a9c036e 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ open class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -275,7 +276,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ public enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -435,7 +436,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..57bab28b1998 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + 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 + }() - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + open 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift index e1ecb39726e7..516590da5d9e 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation open class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift index f8faed255bf0..1f948ae12f78 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -68,22 +68,9 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter - } -}() - extension Date: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return CodableHelper.dateFormatter.string(from: self) as Any } } @@ -121,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -148,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -160,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -170,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -184,3 +171,5 @@ extension KeyedDecodingContainerProtocol { } } + + diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index fb76bbed26f7..ca05906d4206 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ public struct JSONDataEncoding: ParameterEncoding { } public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..6ae673e1f8ca 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift index 25161165865e..408563890359 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 83a06951ccd6..e9c0e5a143d6 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? + public var mapString: [String:String]? + public var mapMapString: [String:[String:String]]? - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a36..46d4828ceb62 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + public struct Animal: Codable { public var className: String diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efdc8..e7bea63f8ed2 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da89074..781d0feae1bf 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + public struct ApiResponse: Codable { public var code: Int? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 3843287630b1..ddf52a557ba9 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index f8b198e81f50..c5c237ef5813 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? @@ -15,7 +16,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 67f7f7e5151f..c88a3a190ede 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayTest: Codable { public var arrayOfString: [String]? @@ -19,7 +20,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d576b50b1c9c..b2487f3ebde0 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + public struct Capitalization: Codable { public var smallCamel: String? @@ -26,7 +27,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7d819cbcc8f4..c246fc1e29e9 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + public struct Cat: Codable { public var className: String diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffab1..b50c502feef7 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct CatAllOf: Codable { public var declawed: Bool? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index abcd82b07837..fe7b9decd6d0 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + public struct Category: Codable { public var _id: Int64? @@ -17,7 +18,7 @@ public struct Category: Codable { self.name = name } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _id = "id" case name } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 28cb30ce7b4b..e2a7d4427a06 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - public struct ClassModel: Codable { public var _class: String? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca37280..8d2e27738257 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + public struct Client: Codable { public var client: String? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c1228008e..ed63186cc453 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + public struct Dog: Codable { public var className: String diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5ae..5b07a846597c 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct DogAllOf: Codable { public var breed: String? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 5034ff0b8c68..428c480ea514 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 3c1dfcac577d..7280a621fec7 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 6db9b34d183b..74ec3850fb2e 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumTest: Codable { public enum EnumString: String, Codable { @@ -41,7 +42,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift index ea3520f053dd..abf3ccffc485 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - public struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f1457939a..bc6db3d9d760 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + public struct FileSchemaTestClass: Codable { public var file: File? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b3d..260526eb804b 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct FormatTest: Codable { public var integer: Int? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb17..c8ee22c8b10a 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct HasOnlyReadOnly: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 08d59953873e..fcf96a59c070 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + public struct List: Codable { public var _123list: String? @@ -15,7 +16,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 3a10a7dfcaf6..6807459a2aa1 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + public var mapMapOfString: [String:[String:String]]? + public var mapOfEnumString: [String:String]? + public var directMap: [String:Bool]? public var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f28932..ee0bc70f2c48 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7ed6aad907be..05b7e7231ca2 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - public struct Model200Response: Codable { public var name: Int? @@ -19,7 +18,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index ce9ffe4fb38e..06d5ac3c87b1 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - public struct Name: Codable { public var name: Int @@ -23,7 +22,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index abd2269e8e76..f61554861ab9 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct NumberOnly: Codable { public var justNumber: Double? @@ -15,7 +16,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index f2b7565e2d91..0d08d5fdf8da 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + public struct Order: Codable { public enum Status: String, Codable { @@ -31,7 +32,7 @@ public struct Order: Codable { self.complete = complete } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _id = "id" case petId case quantity diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 49aec001c5db..5ef0caccc9ff 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + public struct OuterComposite: Codable { public var myNumber: Double? @@ -19,7 +20,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index 9f80fc95ecf0..bd1643d279ed 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 971ce9d4db6e..3d0d5a751953 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + public struct Pet: Codable { public enum Status: String, Codable { @@ -31,7 +32,7 @@ public struct Pet: Codable { self.status = status } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _id = "id" case category case name diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd1000..d0262dec8cea 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + public struct ReadOnlyFirst: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 076082af842f..18046e969339 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - public struct Return: Codable { public var _return: Int? @@ -17,7 +16,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index e79fc45c0e91..c52be66ea645 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + public struct SpecialModelName: Codable { public var specialPropertyName: Int64? @@ -15,7 +16,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee477..ffb79addebbb 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 83efe72b8a4e..853e9af22210 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + public struct Tag: Codable { public var _id: Int64? @@ -17,7 +18,7 @@ public struct Tag: Codable { self.name = name } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _id = "id" case name } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index bf0006e1a266..b936721e454d 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderDefault: Codable { public var stringItem: String = "what" @@ -23,7 +24,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 602a2a6d185a..d7bf3f5b13ee 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderExample: Codable { public var stringItem: String @@ -23,7 +24,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7d6b24b9e100..dec4a9ce4bde 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + public struct User: Codable { public var _id: Int64? @@ -30,7 +31,7 @@ public struct User: Codable { self.userStatus = userStatus } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _id = "id" case username case firstName diff --git a/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 200070096800..d94614b34fc7 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 832282d224f8..13586cdadd87 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,23 +9,23 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -35,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -58,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 5b75a4da29fe..7399d2c1c562 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 39c419674ba1..3b580e45507d 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class FakeAPI { /** @@ -164,7 +166,7 @@ open class FakeAPI { */ open class func testBodyWithFileSchema( body: FileSchemaTestClass) -> Promise { let deferred = Promise.pending() - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -198,9 +200,9 @@ open class FakeAPI { - parameter body: (body) - returns: Promise */ - open class func testBodyWithQueryParams( query: String, body: User) -> Promise { + open class func testBodyWithQueryParams( query: String, body: User) -> Promise { let deferred = Promise.pending() - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -289,9 +291,9 @@ open class FakeAPI { - parameter callback: (form) None (optional) - returns: Promise */ - open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise { + open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise { let deferred = Promise.pending() - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -327,7 +329,7 @@ open class FakeAPI { open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -346,7 +348,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -434,9 +436,9 @@ open class FakeAPI { - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - returns: Promise */ - open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise { + open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise { let deferred = Promise.pending() - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -463,19 +465,19 @@ open class FakeAPI { open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "enum_form_string_array": enumFormStringArray?.encodeToJSON(), "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -500,9 +502,9 @@ open class FakeAPI { - parameter int64Group: (query) Integer in group parameters (optional) - returns: Promise */ - open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise { + open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise { let deferred = Promise.pending() - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -527,13 +529,13 @@ open class FakeAPI { open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -553,9 +555,9 @@ open class FakeAPI { - parameter param: (body) request body - returns: Promise */ - open class func testInlineAdditionalProperties( param: [String: String]) -> Promise { + open class func testInlineAdditionalProperties( param: [String:String]) -> Promise { let deferred = Promise.pending() - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -571,7 +573,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -590,9 +592,9 @@ open class FakeAPI { - parameter param2: (form) field2 - returns: Promise */ - open class func testJsonFormData( param: String, param2: String) -> Promise { + open class func testJsonFormData( param: String, param2: String) -> Promise { let deferred = Promise.pending() - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -612,14 +614,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "param": param.encodeToJSON(), "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 574ec49021ba..f43f705eb6fb 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class FakeClassnameTags123API { /** To test class name in snake case diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 8d31c177eb97..02a5e5417a6f 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class PetAPI { /** Add a new pet to the store @@ -17,7 +19,7 @@ open class PetAPI { */ open class func addPet( body: Pet) -> Promise { let deferred = Promise.pending() - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -55,9 +57,9 @@ open class PetAPI { - parameter apiKey: (header) (optional) - returns: Promise */ - open class func deletePet( petId: Int64, apiKey: String? = nil) -> Promise { + open class func deletePet( petId: Int64, apiKey: String? = nil) -> Promise { let deferred = Promise.pending() - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -83,8 +85,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -138,8 +140,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -183,8 +185,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -231,8 +233,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -248,7 +250,7 @@ open class PetAPI { */ open class func updatePet( body: Pet) -> Promise { let deferred = Promise.pending() - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -287,9 +289,9 @@ open class PetAPI { - parameter status: (form) Updated status of the pet (optional) - returns: Promise */ - open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil) -> Promise { + open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil) -> Promise { let deferred = Promise.pending() - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -316,14 +318,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "name": name?.encodeToJSON(), "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -339,7 +341,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - returns: Promise */ - open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise { + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise { let deferred = Promise.pending() uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in if let error = error { @@ -370,14 +372,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -393,7 +395,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - returns: Promise */ - open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise { + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise { let deferred = Promise.pending() uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in if let error = error { @@ -424,14 +426,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 685827cebe6a..eeb3548e88a0 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class StoreAPI { /** Delete purchase order by ID @@ -17,7 +19,7 @@ open class StoreAPI { */ open class func deleteOrder( orderId: String) -> Promise { let deferred = Promise.pending() - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -40,8 +42,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,8 +56,8 @@ open class StoreAPI { - returns: Promise<[String:Int]> */ - open class func getInventory() -> Promise<[String: Int]> { - let deferred = Promise<[String: Int]>.pending() + open class func getInventory() -> Promise<[String:Int]> { + let deferred = Promise<[String:Int]>.pending() getInventoryWithRequestBuilder().execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) @@ -77,14 +79,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -122,8 +124,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 83f4674553cb..ab269c056795 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class UserAPI { /** Create user @@ -17,7 +19,7 @@ open class UserAPI { */ open class func createUser( body: User) -> Promise { let deferred = Promise.pending() - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -54,7 +56,7 @@ open class UserAPI { */ open class func createUsersWithArrayInput( body: [User]) -> Promise { let deferred = Promise.pending() - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -90,7 +92,7 @@ open class UserAPI { */ open class func createUsersWithListInput( body: [User]) -> Promise { let deferred = Promise.pending() - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -126,7 +128,7 @@ open class UserAPI { */ open class func deleteUser( username: String) -> Promise { let deferred = Promise.pending() - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -149,8 +151,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -190,8 +192,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -206,7 +208,7 @@ open class UserAPI { - parameter password: (query) The password for login in clear text - returns: Promise */ - open class func loginUser( username: String, password: String) -> Promise { + open class func loginUser( username: String, password: String) -> Promise { let deferred = Promise.pending() loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in if let error = error { @@ -231,11 +233,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -251,7 +253,7 @@ open class UserAPI { */ open class func logoutUser() -> Promise { let deferred = Promise.pending() - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { @@ -269,8 +271,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -285,9 +287,9 @@ open class UserAPI { - parameter body: (body) Updated user object - returns: Promise */ - open class func updateUser( username: String, body: User) -> Promise { + open class func updateUser( username: String, body: User) -> Promise { let deferred = Promise.pending() - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) } else { diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 1d54e695608b..f8521a9c036e 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ open class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -275,7 +276,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ public enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -435,7 +436,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..57bab28b1998 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + 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 + }() - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + open 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index e1ecb39726e7..516590da5d9e 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation open class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 95ad6eec74ee..8278ae0f3b20 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -69,22 +69,9 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter - } -}() - extension Date: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return CodableHelper.dateFormatter.string(from: self) as Any } } @@ -122,24 +109,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -149,7 +136,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -161,8 +148,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -171,8 +158,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -187,7 +174,7 @@ extension KeyedDecodingContainerProtocol { } extension RequestBuilder { - public func execute() -> Promise> { + public func execute() -> Promise> { let deferred = Promise>.pending() self.execute { (response: Response?, error: Error?) in if let response = response { diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index fb76bbed26f7..ca05906d4206 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ public struct JSONDataEncoding: ParameterEncoding { } public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..6ae673e1f8ca 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index 25161165865e..408563890359 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 83a06951ccd6..e9c0e5a143d6 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? + public var mapString: [String:String]? + public var mapMapString: [String:[String:String]]? - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a36..46d4828ceb62 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + public struct Animal: Codable { public var className: String diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efdc8..e7bea63f8ed2 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da89074..781d0feae1bf 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + public struct ApiResponse: Codable { public var code: Int? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 3843287630b1..ddf52a557ba9 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index f8b198e81f50..c5c237ef5813 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? @@ -15,7 +16,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 67f7f7e5151f..c88a3a190ede 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayTest: Codable { public var arrayOfString: [String]? @@ -19,7 +20,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d576b50b1c9c..b2487f3ebde0 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + public struct Capitalization: Codable { public var smallCamel: String? @@ -26,7 +27,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f3113f..087b65ef0443 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + public struct Cat: Codable { public var className: String diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffab1..b50c502feef7 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct CatAllOf: Codable { public var declawed: Bool? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e1974..bcd0a62e0108 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + public struct Category: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 28cb30ce7b4b..e2a7d4427a06 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - public struct ClassModel: Codable { public var _class: String? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca37280..8d2e27738257 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + public struct Client: Codable { public var client: String? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c1228008e..ed63186cc453 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + public struct Dog: Codable { public var className: String diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5ae..5b07a846597c 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct DogAllOf: Codable { public var breed: String? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 5034ff0b8c68..428c480ea514 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 3c1dfcac577d..7280a621fec7 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 6db9b34d183b..74ec3850fb2e 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumTest: Codable { public enum EnumString: String, Codable { @@ -41,7 +42,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index ea3520f053dd..abf3ccffc485 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - public struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f1457939a..bc6db3d9d760 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + public struct FileSchemaTestClass: Codable { public var file: File? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b3d..260526eb804b 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct FormatTest: Codable { public var integer: Int? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb17..c8ee22c8b10a 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct HasOnlyReadOnly: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 08d59953873e..fcf96a59c070 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + public struct List: Codable { public var _123list: String? @@ -15,7 +16,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 3a10a7dfcaf6..6807459a2aa1 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + public var mapMapOfString: [String:[String:String]]? + public var mapOfEnumString: [String:String]? + public var directMap: [String:Bool]? public var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f28932..ee0bc70f2c48 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7ed6aad907be..05b7e7231ca2 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - public struct Model200Response: Codable { public var name: Int? @@ -19,7 +18,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index ce9ffe4fb38e..06d5ac3c87b1 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - public struct Name: Codable { public var name: Int @@ -23,7 +22,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index abd2269e8e76..f61554861ab9 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct NumberOnly: Codable { public var justNumber: Double? @@ -15,7 +16,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index a6e1b1d2e5e4..d38c8953f0f6 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + public struct Order: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 49aec001c5db..5ef0caccc9ff 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + public struct OuterComposite: Codable { public var myNumber: Double? @@ -19,7 +20,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index 9f80fc95ecf0..bd1643d279ed 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index af60a550bb19..e943c40a8c48 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + public struct Pet: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd1000..d0262dec8cea 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + public struct ReadOnlyFirst: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 076082af842f..18046e969339 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - public struct Return: Codable { public var _return: Int? @@ -17,7 +16,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index e79fc45c0e91..c52be66ea645 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + public struct SpecialModelName: Codable { public var specialPropertyName: Int64? @@ -15,7 +16,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee477..ffb79addebbb 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5a0..8277746be90e 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + public struct Tag: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index bf0006e1a266..b936721e454d 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderDefault: Codable { public var stringItem: String = "what" @@ -23,7 +24,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 602a2a6d185a..d7bf3f5b13ee 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderExample: Codable { public var stringItem: String @@ -23,7 +24,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed7356..d71e55e3c195 100644 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + public struct User: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift4/resultLibrary/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/resultLibrary/Package.swift b/samples/client/petstore/swift4/resultLibrary/Package.swift index e5c5f0f33b82..a847bc5077d1 100644 --- a/samples/client/petstore/swift4/resultLibrary/Package.swift +++ b/samples/client/petstore/swift4/resultLibrary/Package.swift @@ -9,11 +9,11 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -22,6 +22,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["Alamofire"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 200070096800..d94614b34fc7 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 9e4312f685de..13586cdadd87 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,22 +9,23 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -34,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -57,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index fb4bb8cfdb43..0cde67c78990 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -14,7 +16,7 @@ open class AnotherFakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index adfc6341ece7..c9cdeca57438 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,13 +7,15 @@ import Foundation + + open class FakeAPI { /** - parameter body: (body) Input boolean as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -58,7 +60,7 @@ open class FakeAPI { - parameter body: (body) Input composite as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -103,7 +105,7 @@ open class FakeAPI { - parameter body: (body) Input number as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -148,7 +150,7 @@ open class FakeAPI { - parameter body: (body) Input string as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -193,8 +195,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -208,7 +210,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ result: Result) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -241,8 +243,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -257,7 +259,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ result: Result) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -279,7 +281,7 @@ open class FakeAPI { var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query + "query": query.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -293,7 +295,7 @@ open class FakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -354,8 +356,8 @@ open class FakeAPI { - parameter callback: (form) None (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -383,7 +385,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -418,26 +420,26 @@ open class FakeAPI { open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), - "number": number, - "float": float, - "double": double, - "string": string, - "pattern_without_delimiter": patternWithoutDelimiter, - "byte": byte, - "binary": binary, + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), "date": date?.encodeToJSON(), "dateTime": dateTime?.encodeToJSON(), - "password": password, - "callback": callback + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -525,8 +527,8 @@ open class FakeAPI { - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -548,7 +550,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ result: Result) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -574,24 +576,24 @@ open class FakeAPI { open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray, - "enum_form_string": enumFormString?.rawValue + let formParams: [String:Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray, - "enum_query_string": enumQueryString?.rawValue, - "enum_query_integer": enumQueryInteger?.rawValue, - "enum_query_double": enumQueryDouble?.rawValue + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray, - "enum_header_string": enumHeaderString?.rawValue + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) @@ -611,8 +613,8 @@ open class FakeAPI { - parameter int64Group: (query) Integer in group parameters (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -632,7 +634,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ result: Result) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -656,18 +658,18 @@ open class FakeAPI { open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup, - "boolean_group": booleanGroup + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) @@ -682,8 +684,8 @@ open class FakeAPI { - parameter param: (body) request body - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -697,8 +699,8 @@ open class FakeAPI { - parameter param: (body) request body - parameter completion: completion handler to receive the result */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ result: Result) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ result: Result) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -713,7 +715,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -732,8 +734,8 @@ open class FakeAPI { - parameter param2: (form) field2 - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -749,7 +751,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ result: Result) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -768,14 +770,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param, - "param2": param2 + let formParams: [String:Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 09c9696dec65..3ee95e0d558e 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -14,7 +16,7 @@ open class FakeClassnameTags123API { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c8f66b41e872..f6453d755eb4 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -14,8 +16,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func addPet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -30,7 +32,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func addPet(body: Pet, completion: @escaping ((_ result: Result) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -67,8 +69,8 @@ open class PetAPI { - parameter apiKey: (header) (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -84,7 +86,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -109,11 +111,11 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ - "api_key": apiKey + "api_key": apiKey?.encodeToJSON() ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) @@ -137,7 +139,7 @@ open class PetAPI { - parameter status: (query) Status values that need to be considered for filter - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in completion(response?.body, error) } @@ -173,11 +175,11 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status + "status": status.encodeToJSON() ]) let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -191,7 +193,7 @@ open class PetAPI { - parameter tags: (query) Tags to filter by - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in completion(response?.body, error) } @@ -227,11 +229,11 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags + "tags": tags.encodeToJSON() ]) let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -245,7 +247,7 @@ open class PetAPI { - parameter petId: (path) ID of pet to return - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -284,8 +286,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -299,8 +301,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -315,7 +317,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func updatePet(body: Pet, completion: @escaping ((_ result: Result) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -353,8 +355,8 @@ open class PetAPI { - parameter status: (form) Updated status of the pet (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -371,7 +373,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -397,14 +399,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name, - "status": status + let formParams: [String:Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -420,7 +422,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in completion(response?.body, error) } @@ -462,14 +464,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -485,7 +487,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in completion(response?.body, error) } @@ -527,14 +529,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata, - "requiredFile": requiredFile + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 62ae519105c5..3540be19c3e2 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -14,8 +16,8 @@ open class StoreAPI { - parameter orderId: (path) ID of the order that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -30,7 +32,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the result */ open class func deleteOrder(orderId: String, completion: @escaping ((_ result: Result) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -52,8 +54,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -66,7 +68,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in completion(response?.body, error) } @@ -76,7 +78,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the result */ - open class func getInventory(completion: @escaping ((_ result: Result<[String: Int], Error>) -> Void)) { + open class func getInventory(completion: @escaping ((_ result: Result<[String:Int], Error>) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in if let error = error { completion(.failure(error)) @@ -97,14 +99,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -115,7 +117,7 @@ open class StoreAPI { - parameter orderId: (path) ID of pet that needs to be fetched - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -151,8 +153,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -166,7 +168,7 @@ open class StoreAPI { - parameter body: (body) order placed for purchasing the pet - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index d0971feb2c1c..6ee23f9b678c 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -14,8 +16,8 @@ open class UserAPI { - parameter body: (body) Created user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUser(body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -30,7 +32,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func createUser(body: User, completion: @escaping ((_ result: Result) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -64,8 +66,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -80,7 +82,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ result: Result) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -113,8 +115,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -129,7 +131,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func createUsersWithListInput(body: [User], completion: @escaping ((_ result: Result) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -162,8 +164,8 @@ open class UserAPI { - parameter username: (path) The name that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + open class func deleteUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -178,7 +180,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func deleteUser(username: String, completion: @escaping ((_ result: Result) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -200,8 +202,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -215,7 +217,7 @@ open class UserAPI { - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in completion(response?.body, error) } @@ -250,8 +252,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -266,7 +268,7 @@ open class UserAPI { - parameter password: (query) The password for login in clear text - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in completion(response?.body, error) } @@ -301,12 +303,12 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username, - "password": password + "username": username.encodeToJSON(), + "password": password.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -319,8 +321,8 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + open class func logoutUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -334,7 +336,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func logoutUser(completion: @escaping ((_ result: Result) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { @@ -351,8 +353,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -367,8 +369,8 @@ open class UserAPI { - parameter body: (body) Updated user object - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -384,7 +386,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func updateUser(username: String, body: User, completion: @escaping ((_ result: Result) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) } else { diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 60ce28c66a27..f8521a9c036e 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ open class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -156,7 +157,7 @@ open class AlamofireRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in + validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in cleanupRequest() if stringResponse.result.isFailure { @@ -176,7 +177,7 @@ open class AlamofireRequestBuilder: RequestBuilder { ) }) case is URL.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() do { @@ -226,7 +227,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return }) case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in cleanupRequest() if voidResponse.result.isFailure { @@ -245,7 +246,7 @@ open class AlamofireRequestBuilder: RequestBuilder { ) }) default: - validatedRequest.responseData(completionHandler: { (dataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() if dataResponse.result.isFailure { @@ -275,7 +276,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ public enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -358,7 +359,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild switch T.self { case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in + validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in cleanupRequest() if stringResponse.result.isFailure { @@ -378,7 +379,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild ) }) case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in cleanupRequest() if voidResponse.result.isFailure { @@ -397,7 +398,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild ) }) case is Data.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() if dataResponse.result.isFailure { @@ -417,7 +418,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild ) }) default: - validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in + validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in cleanupRequest() guard dataResponse.result.isSuccess else { @@ -435,7 +436,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..57bab28b1998 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + 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 + }() - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + open 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index e1ecb39726e7..516590da5d9e 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation open class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index b223c143e0f0..1f948ae12f78 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -34,6 +34,10 @@ 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() @@ -64,22 +68,15 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any } -}() +} -extension Date: JSONEncodable { +extension URL: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return self } } @@ -111,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -138,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -150,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -160,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -174,3 +171,5 @@ extension KeyedDecodingContainerProtocol { } } + + diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index fb76bbed26f7..ca05906d4206 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ public struct JSONDataEncoding: ParameterEncoding { } public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..6ae673e1f8ca 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index 25161165865e..408563890359 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 83a06951ccd6..e9c0e5a143d6 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? + public var mapString: [String:String]? + public var mapMapString: [String:[String:String]]? - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a36..46d4828ceb62 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + public struct Animal: Codable { public var className: String diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efdc8..e7bea63f8ed2 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da89074..781d0feae1bf 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + public struct ApiResponse: Codable { public var code: Int? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 3843287630b1..ddf52a557ba9 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index f8b198e81f50..c5c237ef5813 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? @@ -15,7 +16,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 67f7f7e5151f..c88a3a190ede 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayTest: Codable { public var arrayOfString: [String]? @@ -19,7 +20,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d576b50b1c9c..b2487f3ebde0 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + public struct Capitalization: Codable { public var smallCamel: String? @@ -26,7 +27,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f3113f..087b65ef0443 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + public struct Cat: Codable { public var className: String diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffab1..b50c502feef7 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct CatAllOf: Codable { public var declawed: Bool? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e1974..bcd0a62e0108 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + public struct Category: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 28cb30ce7b4b..e2a7d4427a06 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - public struct ClassModel: Codable { public var _class: String? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca37280..8d2e27738257 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + public struct Client: Codable { public var client: String? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c1228008e..ed63186cc453 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + public struct Dog: Codable { public var className: String diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5ae..5b07a846597c 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct DogAllOf: Codable { public var breed: String? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 5034ff0b8c68..428c480ea514 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 3c1dfcac577d..7280a621fec7 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 6db9b34d183b..74ec3850fb2e 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumTest: Codable { public enum EnumString: String, Codable { @@ -41,7 +42,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index ea3520f053dd..abf3ccffc485 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - public struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f1457939a..bc6db3d9d760 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + public struct FileSchemaTestClass: Codable { public var file: File? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b3d..260526eb804b 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct FormatTest: Codable { public var integer: Int? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb17..c8ee22c8b10a 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct HasOnlyReadOnly: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 08d59953873e..fcf96a59c070 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + public struct List: Codable { public var _123list: String? @@ -15,7 +16,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 3a10a7dfcaf6..6807459a2aa1 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + public var mapMapOfString: [String:[String:String]]? + public var mapOfEnumString: [String:String]? + public var directMap: [String:Bool]? public var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f28932..ee0bc70f2c48 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7ed6aad907be..05b7e7231ca2 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - public struct Model200Response: Codable { public var name: Int? @@ -19,7 +18,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index ce9ffe4fb38e..06d5ac3c87b1 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - public struct Name: Codable { public var name: Int @@ -23,7 +22,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index abd2269e8e76..f61554861ab9 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct NumberOnly: Codable { public var justNumber: Double? @@ -15,7 +16,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index a6e1b1d2e5e4..d38c8953f0f6 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + public struct Order: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 49aec001c5db..5ef0caccc9ff 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + public struct OuterComposite: Codable { public var myNumber: Double? @@ -19,7 +20,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index 9f80fc95ecf0..bd1643d279ed 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index af60a550bb19..e943c40a8c48 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + public struct Pet: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd1000..d0262dec8cea 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + public struct ReadOnlyFirst: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 076082af842f..18046e969339 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - public struct Return: Codable { public var _return: Int? @@ -17,7 +16,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index e79fc45c0e91..c52be66ea645 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + public struct SpecialModelName: Codable { public var specialPropertyName: Int64? @@ -15,7 +16,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee477..ffb79addebbb 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5a0..8277746be90e 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + public struct Tag: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index bf0006e1a266..b936721e454d 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderDefault: Codable { public var stringItem: String = "what" @@ -23,7 +24,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 602a2a6d185a..d7bf3f5b13ee 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderExample: Codable { public var stringItem: String @@ -23,7 +24,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed7356..d71e55e3c195 100644 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + public struct User: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswiftLibrary/Package.swift b/samples/client/petstore/swift4/rxswiftLibrary/Package.swift index 6c19a2b64cc6..ad243b475b41 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/Package.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/Package.swift @@ -9,12 +9,12 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), - .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0") + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -23,6 +23,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["Alamofire", "RxSwift"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 200070096800..d94614b34fc7 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 832282d224f8..13586cdadd87 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,23 +9,23 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -35,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -58,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 819fc85beda2..172d3e1d6c10 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index edbc9b6fffc6..9bebdd744259 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class FakeAPI { /** @@ -172,7 +174,7 @@ open class FakeAPI { */ open class func testBodyWithFileSchema(body: FileSchemaTestClass) -> Observable { return Observable.create { observer -> Disposable in - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -210,7 +212,7 @@ open class FakeAPI { */ open class func testBodyWithQueryParams(query: String, body: User) -> Observable { return Observable.create { observer -> Disposable in - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -305,7 +307,7 @@ open class FakeAPI { */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable { return Observable.create { observer -> Disposable in - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -343,7 +345,7 @@ open class FakeAPI { open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -362,7 +364,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -452,7 +454,7 @@ open class FakeAPI { */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Observable { return Observable.create { observer -> Disposable in - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -481,19 +483,19 @@ open class FakeAPI { open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "enum_form_string_array": enumFormStringArray?.encodeToJSON(), "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -520,7 +522,7 @@ open class FakeAPI { */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Observable { return Observable.create { observer -> Disposable in - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -547,13 +549,13 @@ open class FakeAPI { open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -573,9 +575,9 @@ open class FakeAPI { - parameter param: (body) request body - returns: Observable */ - open class func testInlineAdditionalProperties(param: [String: String]) -> Observable { + open class func testInlineAdditionalProperties(param: [String:String]) -> Observable { return Observable.create { observer -> Disposable in - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -593,7 +595,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -614,7 +616,7 @@ open class FakeAPI { */ open class func testJsonFormData(param: String, param2: String) -> Observable { return Observable.create { observer -> Disposable in - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -636,14 +638,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "param": param.encodeToJSON(), "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index c34ace880ce8..0129283fe4d2 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class FakeClassnameTags123API { /** To test class name in snake case diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 6b4797fc19a1..556ebcef5e8f 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class PetAPI { /** Add a new pet to the store @@ -17,7 +19,7 @@ open class PetAPI { */ open class func addPet(body: Pet) -> Observable { return Observable.create { observer -> Disposable in - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -59,7 +61,7 @@ open class PetAPI { */ open class func deletePet(petId: Int64, apiKey: String? = nil) -> Observable { return Observable.create { observer -> Disposable in - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -87,8 +89,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -144,8 +146,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -191,8 +193,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -241,8 +243,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -258,7 +260,7 @@ open class PetAPI { */ open class func updatePet(body: Pet) -> Observable { return Observable.create { observer -> Disposable in - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -301,7 +303,7 @@ open class PetAPI { */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Observable { return Observable.create { observer -> Disposable in - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -330,14 +332,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "name": name?.encodeToJSON(), "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -386,14 +388,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -442,14 +444,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index c03311277b9a..a8c2b20948ef 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class StoreAPI { /** Delete purchase order by ID @@ -17,7 +19,7 @@ open class StoreAPI { */ open class func deleteOrder(orderId: String) -> Observable { return Observable.create { observer -> Disposable in - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -42,8 +44,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -56,7 +58,7 @@ open class StoreAPI { - returns: Observable<[String:Int]> */ - open class func getInventory() -> Observable<[String: Int]> { + open class func getInventory() -> Observable<[String:Int]> { return Observable.create { observer -> Disposable in getInventoryWithRequestBuilder().execute { (response, error) -> Void in if let error = error { @@ -81,14 +83,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -128,8 +130,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index ec28b4121d09..2a877f7c7f06 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class UserAPI { /** Create user @@ -17,7 +19,7 @@ open class UserAPI { */ open class func createUser(body: User) -> Observable { return Observable.create { observer -> Disposable in - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -56,7 +58,7 @@ open class UserAPI { */ open class func createUsersWithArrayInput(body: [User]) -> Observable { return Observable.create { observer -> Disposable in - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -94,7 +96,7 @@ open class UserAPI { */ open class func createUsersWithListInput(body: [User]) -> Observable { return Observable.create { observer -> Disposable in - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -132,7 +134,7 @@ open class UserAPI { */ open class func deleteUser(username: String) -> Observable { return Observable.create { observer -> Disposable in - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -157,8 +159,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -200,8 +202,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -243,11 +245,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -263,7 +265,7 @@ open class UserAPI { */ open class func logoutUser() -> Observable { return Observable.create { observer -> Disposable in - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { @@ -283,8 +285,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -301,7 +303,7 @@ open class UserAPI { */ open class func updateUser(username: String, body: User) -> Observable { return Observable.create { observer -> Disposable in - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if let error = error { observer.onError(error) } else { diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 1d54e695608b..f8521a9c036e 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ open class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -275,7 +276,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ public enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -435,7 +436,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..57bab28b1998 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + 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 + }() - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + open 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index e1ecb39726e7..516590da5d9e 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation open class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index f8faed255bf0..1f948ae12f78 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -68,22 +68,9 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter - } -}() - extension Date: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return CodableHelper.dateFormatter.string(from: self) as Any } } @@ -121,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -148,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -160,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -170,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -184,3 +171,5 @@ extension KeyedDecodingContainerProtocol { } } + + diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index fb76bbed26f7..ca05906d4206 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ public struct JSONDataEncoding: ParameterEncoding { } public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..6ae673e1f8ca 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index 25161165865e..408563890359 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 83a06951ccd6..e9c0e5a143d6 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? + public var mapString: [String:String]? + public var mapMapString: [String:[String:String]]? - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a36..46d4828ceb62 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + public struct Animal: Codable { public var className: String diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efdc8..e7bea63f8ed2 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da89074..781d0feae1bf 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + public struct ApiResponse: Codable { public var code: Int? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 3843287630b1..ddf52a557ba9 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index f8b198e81f50..c5c237ef5813 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? @@ -15,7 +16,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 67f7f7e5151f..c88a3a190ede 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayTest: Codable { public var arrayOfString: [String]? @@ -19,7 +20,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d576b50b1c9c..b2487f3ebde0 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + public struct Capitalization: Codable { public var smallCamel: String? @@ -26,7 +27,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f3113f..087b65ef0443 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + public struct Cat: Codable { public var className: String diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffab1..b50c502feef7 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct CatAllOf: Codable { public var declawed: Bool? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e1974..bcd0a62e0108 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + public struct Category: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 28cb30ce7b4b..e2a7d4427a06 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - public struct ClassModel: Codable { public var _class: String? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca37280..8d2e27738257 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + public struct Client: Codable { public var client: String? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c1228008e..ed63186cc453 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + public struct Dog: Codable { public var className: String diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5ae..5b07a846597c 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct DogAllOf: Codable { public var breed: String? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 5034ff0b8c68..428c480ea514 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 3c1dfcac577d..7280a621fec7 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 6db9b34d183b..74ec3850fb2e 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumTest: Codable { public enum EnumString: String, Codable { @@ -41,7 +42,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index ea3520f053dd..abf3ccffc485 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - public struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f1457939a..bc6db3d9d760 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + public struct FileSchemaTestClass: Codable { public var file: File? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b3d..260526eb804b 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct FormatTest: Codable { public var integer: Int? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb17..c8ee22c8b10a 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct HasOnlyReadOnly: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 08d59953873e..fcf96a59c070 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + public struct List: Codable { public var _123list: String? @@ -15,7 +16,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 3a10a7dfcaf6..6807459a2aa1 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + public var mapMapOfString: [String:[String:String]]? + public var mapOfEnumString: [String:String]? + public var directMap: [String:Bool]? public var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f28932..ee0bc70f2c48 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7ed6aad907be..05b7e7231ca2 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - public struct Model200Response: Codable { public var name: Int? @@ -19,7 +18,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index ce9ffe4fb38e..06d5ac3c87b1 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - public struct Name: Codable { public var name: Int @@ -23,7 +22,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index abd2269e8e76..f61554861ab9 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct NumberOnly: Codable { public var justNumber: Double? @@ -15,7 +16,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index a6e1b1d2e5e4..d38c8953f0f6 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + public struct Order: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 49aec001c5db..5ef0caccc9ff 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + public struct OuterComposite: Codable { public var myNumber: Double? @@ -19,7 +20,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index 9f80fc95ecf0..bd1643d279ed 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index af60a550bb19..e943c40a8c48 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + public struct Pet: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd1000..d0262dec8cea 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + public struct ReadOnlyFirst: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 076082af842f..18046e969339 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - public struct Return: Codable { public var _return: Int? @@ -17,7 +16,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index e79fc45c0e91..c52be66ea645 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + public struct SpecialModelName: Codable { public var specialPropertyName: Int64? @@ -15,7 +16,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee477..ffb79addebbb 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5a0..8277746be90e 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + public struct Tag: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index bf0006e1a266..b936721e454d 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderDefault: Codable { public var stringItem: String = "what" @@ -23,7 +24,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 602a2a6d185a..d7bf3f5b13ee 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderExample: Codable { public var stringItem: String @@ -23,7 +24,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed7356..d71e55e3c195 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + public struct User: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/Package.swift b/samples/client/petstore/swift4/unwrapRequired/Package.swift index e5c5f0f33b82..a847bc5077d1 100644 --- a/samples/client/petstore/swift4/unwrapRequired/Package.swift +++ b/samples/client/petstore/swift4/unwrapRequired/Package.swift @@ -9,11 +9,11 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -22,6 +22,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["Alamofire"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 200070096800..d94614b34fc7 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { let destination = source.reduce(into: [String: Any]()) { (result, item) in if let value = item.value { result[item.key] = value @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") } else if let value: Any = item.value { result[item.key] = "\(value)" } } } - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { + if let collection = item.value as? Array { let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") result.append(URLQueryItem(name: item.key, value: value)) } else if let value = item.value { @@ -68,3 +68,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift index 832282d224f8..13586cdadd87 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,23 +9,23 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io:80/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -35,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -58,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 02e24286e3c8..1e6b7fc02c2c 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -14,7 +16,7 @@ open class AnotherFakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b0b394aa06e0..0bdeee0b2cb6 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,13 +7,15 @@ import Foundation + + open class FakeAPI { /** - parameter body: (body) Input boolean as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -42,7 +44,7 @@ open class FakeAPI { - parameter body: (body) Input composite as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -71,7 +73,7 @@ open class FakeAPI { - parameter body: (body) Input number as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -100,7 +102,7 @@ open class FakeAPI { - parameter body: (body) Input string as post body (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -129,8 +131,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -163,8 +165,8 @@ open class FakeAPI { - parameter body: (body) - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -200,7 +202,7 @@ open class FakeAPI { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } @@ -244,8 +246,8 @@ open class FakeAPI { - parameter callback: (form) None (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -280,7 +282,7 @@ open class FakeAPI { open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -299,7 +301,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -387,8 +389,8 @@ open class FakeAPI { - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - parameter completion: completion handler to receive the data and the error objects */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -414,19 +416,19 @@ open class FakeAPI { open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "enum_form_string_array": enumFormStringArray?.encodeToJSON(), "enum_form_string": enumFormString?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -451,8 +453,8 @@ open class FakeAPI { - parameter int64Group: (query) Integer in group parameters (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -476,13 +478,13 @@ open class FakeAPI { open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { let path = "/fake" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -502,8 +504,8 @@ open class FakeAPI { - parameter param: (body) request body - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -518,7 +520,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder { let path = "/fake/inline-additionalProperties" let URLString = PetstoreClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) @@ -537,8 +539,8 @@ open class FakeAPI { - parameter param2: (form) field2 - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in + open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -557,14 +559,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "param": param.encodeToJSON(), "param2": param2.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 060d434fbf24..822a371cef34 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -14,7 +16,7 @@ open class FakeClassnameTags123API { - parameter body: (body) client model - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index fe75962a72cf..cc4397947d1d 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -14,8 +16,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func addPet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -52,8 +54,8 @@ open class PetAPI { - parameter apiKey: (header) (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -78,8 +80,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -106,7 +108,7 @@ open class PetAPI { - parameter status: (query) Status values that need to be considered for filter - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in completion(response?.body, error) } @@ -125,8 +127,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -143,7 +145,7 @@ open class PetAPI { - parameter tags: (query) Tags to filter by - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in completion(response?.body, error) } @@ -162,8 +164,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -180,7 +182,7 @@ open class PetAPI { - parameter petId: (path) ID of pet to return - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -202,8 +204,8 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -217,8 +219,8 @@ open class PetAPI { - parameter body: (body) Pet object that needs to be added to the store - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -256,8 +258,8 @@ open class PetAPI { - parameter status: (form) Updated status of the pet (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -283,14 +285,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "name": name?.encodeToJSON(), "status": status?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -306,7 +308,7 @@ open class PetAPI { - parameter file: (form) file to upload (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in completion(response?.body, error) } @@ -329,14 +331,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "file": file?.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -352,7 +354,7 @@ open class PetAPI { - parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in completion(response?.body, error) } @@ -375,14 +377,14 @@ open class PetAPI { let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + let formParams: [String:Any?] = [ "additionalMetadata": additionalMetadata?.encodeToJSON(), "requiredFile": requiredFile.encodeToJSON() ] let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index d5f627df52ac..b62f18f3f020 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -14,8 +16,8 @@ open class StoreAPI { - parameter orderId: (path) ID of the order that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -37,8 +39,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -51,7 +53,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in completion(response?.body, error) } @@ -66,14 +68,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -84,7 +86,7 @@ open class StoreAPI { - parameter orderId: (path) ID of pet that needs to be fetched - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in completion(response?.body, error) } @@ -103,8 +105,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -118,7 +120,7 @@ open class StoreAPI { - parameter body: (body) order placed for purchasing the pet - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index ef4f971a91e2..0e2d140e037d 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -14,8 +16,8 @@ open class UserAPI { - parameter body: (body) Created user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUser(body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -49,8 +51,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -83,8 +85,8 @@ open class UserAPI { - parameter body: (body) List of user object - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in + open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -117,8 +119,8 @@ open class UserAPI { - parameter username: (path) The name that needs to be deleted - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + open class func deleteUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -140,8 +142,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -155,7 +157,7 @@ open class UserAPI { - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in completion(response?.body, error) } @@ -173,8 +175,8 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -189,7 +191,7 @@ open class UserAPI { - parameter password: (query) The password for login in clear text - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in completion(response?.body, error) } @@ -206,11 +208,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -224,8 +226,8 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in + open class func logoutUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute { (response, error) -> Void in if error == nil { completion((), error) } else { @@ -242,8 +244,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -258,8 +260,8 @@ open class UserAPI { - parameter body: (body) Updated user object - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in + open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 1d54e695608b..f8521a9c036e 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -50,7 +50,7 @@ private struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } @@ -88,17 +88,17 @@ open class AlamofireRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the request configuration (e.g. to override the cache policy). */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) } override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString + let managerId:String = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createSessionManager() managerStore[managerId] = manager - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -111,7 +111,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -275,7 +276,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -283,7 +284,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -294,7 +295,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -303,7 +304,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -317,7 +318,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -328,7 +329,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -private enum DownloadException: Error { +fileprivate enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -343,7 +344,7 @@ public enum AlamofireDecodableRequestBuilderError: Error { case generalError(Error) } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { if let credential = self.credential { @@ -435,7 +436,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild return } - var responseObj: Response? + var responseObj: Response? = nil let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) if decodeResult.error == nil { diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..57bab28b1998 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + 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 + }() - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } + open 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 decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T : Encodable { var returnedData: Data? - var returnedError: Error? - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } + var returnedError: Error? = nil do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift index e1ecb39726e7..516590da5d9e 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,9 +7,9 @@ import Foundation open class Configuration { - + // This value is used to configure the date formatter that is used to serialize dates into JSON format. // You must set it prior to encoding any dates, and it will only be read once. public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift index f8faed255bf0..1f948ae12f78 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -68,22 +68,9 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter - } -}() - extension Date: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return CodableHelper.dateFormatter.string(from: self) as Any } } @@ -121,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { var arrayContainer = nestedUnkeyedContainer(forKey: key) try arrayContainer.encode(contentsOf: values) } - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { if let values = values { try encodeArray(values, forKey: key) } } - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { for (key, value) in pairs { try encode(value, forKey: key) } } - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -148,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -160,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -170,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] for key in allKeys { if !excludedKeys.contains(key) { @@ -184,3 +171,5 @@ extension KeyedDecodingContainerProtocol { } } + + diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift index fb76bbed26f7..ca05906d4206 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -42,7 +42,7 @@ public struct JSONDataEncoding: ParameterEncoding { } public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? + var returnedParams: Parameters? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params = Parameters() params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..6ae673e1f8ca 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -10,12 +10,12 @@ import Alamofire open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } @@ -25,7 +25,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? + var params: Parameters? = nil if let encodableObj = encodableObj { do { @@ -39,5 +39,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift index 25161165865e..408563890359 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } @@ -27,7 +27,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 83a06951ccd6..e9c0e5a143d6 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,18 @@ import Foundation + public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? + public var mapString: [String:String]? + public var mapMapString: [String:[String:String]]? - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) { self.mapString = mapString self.mapMapString = mapMapString } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 88eceebd2a2a..42696eb80432 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,6 +7,7 @@ import Foundation + public struct Animal: Codable { public var className: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efdc8..e7bea63f8ed2 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da89074..781d0feae1bf 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,6 +7,7 @@ import Foundation + public struct ApiResponse: Codable { public var code: Int? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 3843287630b1..ddf52a557ba9 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +16,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index f8b198e81f50..c5c237ef5813 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? @@ -15,7 +16,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 67f7f7e5151f..c88a3a190ede 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct ArrayTest: Codable { public var arrayOfString: [String]? @@ -19,7 +20,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d576b50b1c9c..b2487f3ebde0 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,6 +7,7 @@ import Foundation + public struct Capitalization: Codable { public var smallCamel: String? @@ -26,7 +27,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index d6133a3dd5ca..3ad15a0d07e1 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,6 +7,7 @@ import Foundation + public struct Cat: Codable { public var className: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffab1..b50c502feef7 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct CatAllOf: Codable { public var declawed: Bool? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 48b43fc318df..72732bfc0ae4 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,6 +7,7 @@ import Foundation + public struct Category: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 28cb30ce7b4b..e2a7d4427a06 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model with \"_class\" property */ - public struct ClassModel: Codable { public var _class: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca37280..8d2e27738257 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,6 +7,7 @@ import Foundation + public struct Client: Codable { public var client: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 35c8cea0dd04..2164955f52f7 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,6 +7,7 @@ import Foundation + public struct Dog: Codable { public var className: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5ae..5b07a846597c 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,6 +7,7 @@ import Foundation + public struct DogAllOf: Codable { public var breed: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 5034ff0b8c68..428c480ea514 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { @@ -25,7 +26,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 3c1dfcac577d..7280a621fec7 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index b1eb8e98f89a..724a0f6a3154 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct EnumTest: Codable { public enum EnumString: String, Codable { @@ -41,7 +42,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift index ea3520f053dd..abf3ccffc485 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,6 @@ import Foundation /** Must be named `File` for test. */ - public struct File: Codable { /** Test capitalization */ diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f1457939a..bc6db3d9d760 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,6 +7,7 @@ import Foundation + public struct FileSchemaTestClass: Codable { public var file: File? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 4eed10b95a11..125944b4661e 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,6 +7,7 @@ import Foundation + public struct FormatTest: Codable { public var integer: Int? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb17..c8ee22c8b10a 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct HasOnlyReadOnly: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 08d59953873e..fcf96a59c070 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,6 +7,7 @@ import Foundation + public struct List: Codable { public var _123list: String? @@ -15,7 +16,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _123list = "123-list" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 3a10a7dfcaf6..6807459a2aa1 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,26 @@ import Foundation + public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + public var mapMapOfString: [String:[String:String]]? + public var mapOfEnumString: [String:String]? + public var directMap: [String:Bool]? public var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) { self.mapMapOfString = mapMapOfString self.mapOfEnumString = mapOfEnumString self.directMap = directMap self.indirectMap = indirectMap } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f28932..ee0bc70f2c48 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,14 @@ import Foundation + public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { self.uuid = uuid self.dateTime = dateTime self.map = map diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 7ed6aad907be..05b7e7231ca2 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name starting with number */ - public struct Model200Response: Codable { public var name: Int? @@ -19,7 +18,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case _class = "class" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 71ba4c05dcd8..c6152e0b305c 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing model name same as property name */ - public struct Name: Codable { public var name: Int? @@ -23,7 +22,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index abd2269e8e76..f61554861ab9 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,6 +7,7 @@ import Foundation + public struct NumberOnly: Codable { public var justNumber: Double? @@ -15,7 +16,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index a6e1b1d2e5e4..d38c8953f0f6 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,6 +7,7 @@ import Foundation + public struct Order: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 49aec001c5db..5ef0caccc9ff 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,6 +7,7 @@ import Foundation + public struct OuterComposite: Codable { public var myNumber: Double? @@ -19,7 +20,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index 9f80fc95ecf0..bd1643d279ed 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 99eaa1329e48..8ab1d6dc5ebf 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,6 +7,7 @@ import Foundation + public struct Pet: Codable { public enum Status: String, Codable { diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd1000..d0262dec8cea 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,6 +7,7 @@ import Foundation + public struct ReadOnlyFirst: Codable { public var bar: String? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 076082af842f..18046e969339 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,6 @@ import Foundation /** Model for testing reserved words */ - public struct Return: Codable { public var _return: Int? @@ -17,7 +16,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case _return = "return" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index e79fc45c0e91..c52be66ea645 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,6 +7,7 @@ import Foundation + public struct SpecialModelName: Codable { public var specialPropertyName: Int64? @@ -15,7 +16,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee477..ffb79addebbb 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,11 @@ import Foundation + public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +44,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5a0..8277746be90e 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,6 +7,7 @@ import Foundation + public struct Tag: Codable { public var id: Int64? diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 07b590ab1079..86b39f910f8d 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderDefault: Codable { public var stringItem: String? = "what" @@ -23,7 +24,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 29d005161783..c16c6be2938c 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,6 +7,7 @@ import Foundation + public struct TypeHolderExample: Codable { public var stringItem: String? @@ -23,7 +24,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed7356..d71e55e3c195 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,6 +7,7 @@ import Foundation + public struct User: Codable { public var id: Int64? diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift index 4eb3cd23281b..22b7b0f9d96e 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift @@ -34,7 +34,7 @@ open class Swift4TestAPI { var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "client_id": clientId + "client_id": clientId.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift index 0a333db0d102..27cf29c65600 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift @@ -11,27 +11,48 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { - public static var dateformatter: DateFormatter? + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = { + let dateFormatter = DateFormatter() + dateFormatter.calendar = Calendar(identifier: .iso8601) + dateFormatter.locale = Locale(identifier: "en_US_POSIX") + dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) + dateFormatter.dateFormat = Configuration.dateFormat + return dateFormatter + }() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { var returnedDecodable: T? var returnedError: Error? - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - decoder.dateDecodingStrategy = .formatted(formatter) - } - do { - returnedDecodable = try decoder.decode(type, from: data) + returnedDecodable = try self.jsonDecoder.decode(type, from: data) } catch { returnedError = error } @@ -39,33 +60,16 @@ open class CodableHelper { return (returnedDecodable, returnedError) } - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + open class func encode(_ value: T) -> EncodeResult where T: Encodable { var returnedData: Data? var returnedError: Error? - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - if let df = self.dateformatter { - encoder.dateEncodingStrategy = .formatted(df) - } else { - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - encoder.dateEncodingStrategy = .formatted(formatter) - } - do { - returnedData = try encoder.encode(value) + returnedData = try self.jsonEncoder.encode(value) } catch { returnedError = error } return (returnedData, returnedError) } - } diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift index b223c143e0f0..74fcfcf2ad49 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift @@ -34,6 +34,10 @@ 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() @@ -64,22 +68,15 @@ extension Data: JSONEncodable { } } -private let dateFormatter: DateFormatter = { - if let formatter = CodableHelper.dateformatter { - return formatter - } else { - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = Configuration.dateFormat - return formatter +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any } -}() +} -extension Date: JSONEncodable { +extension URL: JSONEncodable { func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any + return self } } diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7bd1267e95f3..827bdec87782 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -15,7 +15,7 @@ open class JSONEncodingHelper { // Encode the Encodable object if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + let encodeResult = CodableHelper.encode(encodableObj) if encodeResult.error == nil { params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) } diff --git a/samples/openapi3/schema/petstore/avro/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro/.openapi-generator/VERSION index 2f81801b7943..c3a2c7076fa8 100644 --- a/samples/openapi3/schema/petstore/avro/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.1-SNAPSHOT \ No newline at end of file +4.2.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 0e97bd19efbf..2f81801b7943 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.1.1-SNAPSHOT \ No newline at end of file From cded5f9cf325bf7c1662e7de286a1d21ed85e0df Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 20 Dec 2019 20:51:46 +0800 Subject: [PATCH 05/72] update dart samples --- .../client/petstore/dart2/openapi/.openapi-generator/VERSION | 4 ---- 1 file changed, 4 deletions(-) diff --git a/samples/client/petstore/dart2/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart2/openapi/.openapi-generator/VERSION index b93d1c64408b..9aadf8cf6576 100644 --- a/samples/client/petstore/dart2/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart2/openapi/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD 4.3.0-SNAPSHOT -======= -4.2.3-SNAPSHOT ->>>>>>> origin/master From 06d1b99e341bdb5d2f4fa61bb7ccdd91e2f14a16 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 20 Dec 2019 21:58:13 +0800 Subject: [PATCH 06/72] update kotlin samples --- .../kotlin-json-request-date/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.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 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.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 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file From 1fd4748563585958c2986ccaf28096a5303f3b0a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 28 Dec 2019 14:25:19 +0800 Subject: [PATCH 07/72] run ensure-up-to-date --- samples/client/petstore/javascript-promise/src/model/BigCat.js | 2 +- .../client/petstore/javascript-promise/src/model/BigCatAllOf.js | 2 +- samples/client/petstore/javascript/src/model/BigCat.js | 2 +- samples/client/petstore/javascript/src/model/BigCatAllOf.js | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/BigCat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/BigCatAllOf.php | 2 +- .../php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php | 2 +- .../petstore/php/OpenAPIClient-php/test/Model/BigCatTest.php | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/big_cat.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/big_cat_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/big_cat.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/big_cat_all_of.rb | 2 +- samples/client/petstore/ruby/spec/models/big_cat_all_of_spec.rb | 2 +- samples/client/petstore/ruby/spec/models/big_cat_spec.rb | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/client/petstore/javascript-promise/src/model/BigCat.js b/samples/client/petstore/javascript-promise/src/model/BigCat.js index 160d712bd605..fbb2c189e69a 100644 --- a/samples/client/petstore/javascript-promise/src/model/BigCat.js +++ b/samples/client/petstore/javascript-promise/src/model/BigCat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/BigCatAllOf.js b/samples/client/petstore/javascript-promise/src/model/BigCatAllOf.js index 3d22270bf17c..c6282a624e44 100644 --- a/samples/client/petstore/javascript-promise/src/model/BigCatAllOf.js +++ b/samples/client/petstore/javascript-promise/src/model/BigCatAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/BigCat.js b/samples/client/petstore/javascript/src/model/BigCat.js index 160d712bd605..fbb2c189e69a 100644 --- a/samples/client/petstore/javascript/src/model/BigCat.js +++ b/samples/client/petstore/javascript/src/model/BigCat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/BigCatAllOf.js b/samples/client/petstore/javascript/src/model/BigCatAllOf.js index 3d22270bf17c..c6282a624e44 100644 --- a/samples/client/petstore/javascript/src/model/BigCatAllOf.js +++ b/samples/client/petstore/javascript/src/model/BigCatAllOf.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCat.php index 3ea2a571c5fb..8cec2b953245 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCat.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCatAllOf.php index 20bed1d23626..445cc59a334b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/BigCatAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php index 791dcecd5d49..9569f429cf7f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatTest.php index c186dfd55103..0420fc69416a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 4.2.3-SNAPSHOT + * OpenAPI Generator version: 4.3.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat.rb index 0c82b9159506..b62dafcaed26 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.3-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat_all_of.rb index 0e136ae86601..ca0cb351b70f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/big_cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/big_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: 4.2.3-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/big_cat.rb b/samples/client/petstore/ruby/lib/petstore/models/big_cat.rb index 0c82b9159506..b62dafcaed26 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/big_cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/big_cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.3-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/big_cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/big_cat_all_of.rb index 0e136ae86601..ca0cb351b70f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/big_cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/big_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: 4.2.3-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/big_cat_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/big_cat_all_of_spec.rb index 54caa8c1626f..559de8889b84 100644 --- a/samples/client/petstore/ruby/spec/models/big_cat_all_of_spec.rb +++ b/samples/client/petstore/ruby/spec/models/big_cat_all_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.3-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/big_cat_spec.rb b/samples/client/petstore/ruby/spec/models/big_cat_spec.rb index b1869d3e5cf3..f8836d2a4f07 100644 --- a/samples/client/petstore/ruby/spec/models/big_cat_spec.rb +++ b/samples/client/petstore/ruby/spec/models/big_cat_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.3-SNAPSHOT +OpenAPI Generator version: 4.3.0-SNAPSHOT =end From 9d53ee4b69eb7f03289098ff8882643b6cb9942a Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Thu, 2 Jan 2020 05:46:49 +0000 Subject: [PATCH 08/72] [kotlin][client] make Request date converter toJson as default (#4884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix for Issue #2205 Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime. Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue. For more info please refer to: https://github.com/OpenAPITools/openapi-generator/issues/2205 * fix java feign parameter request name (#4883) * update sprign cloud feign sample * [JAVA][SPRING][2195] added missing getter for enum value (#2346) * [2195] added missing getter for enum value * updated samples * re-generate spring samples * Removed @JsonValue from toString and regenerated samples * re-generate spring samples Co-authored-by: Esteban Gehring * update samples * [kotlin][client] make Request date converter toJson as default * [kotlin][client] update windows scripts * [kotlin][client] update docs * [kotlin][client] update scripts * [kotlin][client] update scripts Co-authored-by: Filipe Manuel Couto Pinheiro Co-authored-by: William Cheng Co-authored-by: Lukáš Vasek Co-authored-by: Esteban Gehring --- bin/ci/kotlin-client-string.json | 4 +++- bin/kotlin-client-all.sh | 2 +- ...h => kotlin-client-json-request-string.sh} | 2 +- bin/windows/kotlin-client-all.bat | 2 +- .../kotlin-client-json-request-date.bat | 10 -------- .../kotlin-client-json-request-string.bat | 10 ++++++++ docs/generators/kotlin.md | 2 +- .../languages/KotlinClientCodegen.java | 6 ++--- .../Java/libraries/feign/api.mustache | 4 ++-- .../resources/JavaSpring/enumClass.mustache | 8 ++++++- .../JavaSpring/enumOuterClass.mustache | 8 ++++++- .../libraries/spring-cloud/apiClient.mustache | 4 ++-- pom.xml | 2 +- .../org/openapitools/client/api/FakeApi.java | 10 ++++---- .../org/openapitools/client/api/PetApi.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 ++-- .../org/openapitools/client/api/FakeApi.java | 10 ++++---- .../org/openapitools/client/api/PetApi.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 ++-- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../kotlin-json-request-date/settings.gradle | 2 -- .../.openapi-generator-ignore | 0 .../.openapi-generator/VERSION | 0 .../README.md | 0 .../build.gradle | 0 .../docs/ApiResponse.md | 0 .../docs/Category.md | 0 .../docs/Order.md | 0 .../docs/Pet.md | 0 .../docs/PetApi.md | 0 .../docs/StoreApi.md | 0 .../docs/Tag.md | 0 .../docs/User.md | 0 .../docs/UserApi.md | 0 .../pom.xml | 2 +- .../settings.gradle | 2 ++ .../org/openapitools/client/apis/PetApi.kt | 0 .../org/openapitools/client/apis/StoreApi.kt | 0 .../org/openapitools/client/apis/UserApi.kt | 0 .../client/infrastructure/ApiAbstractions.kt | 0 .../client/infrastructure/ApiClient.kt | 8 +------ .../ApiInfrastructureResponse.kt | 0 .../infrastructure/ApplicationDelegates.kt | 0 .../client/infrastructure/ByteArrayAdapter.kt | 0 .../client/infrastructure/Errors.kt | 0 .../client/infrastructure/LocalDateAdapter.kt | 0 .../infrastructure/LocalDateTimeAdapter.kt | 0 .../infrastructure/OffsetDateTimeAdapter.kt | 0 .../client/infrastructure/RequestConfig.kt | 0 .../client/infrastructure/RequestMethod.kt | 0 .../infrastructure/ResponseExtensions.kt | 0 .../client/infrastructure/Serializer.kt | 0 .../client/infrastructure/UUIDAdapter.kt | 0 .../openapitools/client/models/ApiResponse.kt | 0 .../openapitools/client/models/Category.kt | 0 .../org/openapitools/client/models/Order.kt | 0 .../org/openapitools/client/models/Pet.kt | 0 .../org/openapitools/client/models/Tag.kt | 0 .../org/openapitools/client/models/User.kt | 0 .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../org/openapitools/api/PetApiClient.java | 4 ++-- .../org/openapitools/api/StoreApiClient.java | 4 ++-- .../org/openapitools/api/UserApiClient.java | 4 ++-- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/api/PetApiClient.java | 4 ++-- .../org/openapitools/api/StoreApiClient.java | 4 ++-- .../org/openapitools/api/UserApiClient.java | 4 ++-- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../openapitools/virtualan/model/BigCat.java | 6 ++++- .../virtualan/model/BigCatAllOf.java | 6 ++++- .../virtualan/model/EnumArrays.java | 12 ++++++++-- .../virtualan/model/EnumClass.java | 6 ++++- .../virtualan/model/EnumTest.java | 24 +++++++++++++++---- .../openapitools/virtualan/model/MapTest.java | 6 ++++- .../openapitools/virtualan/model/Order.java | 6 ++++- .../virtualan/model/OuterEnum.java | 6 ++++- .../org/openapitools/virtualan/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- 177 files changed, 872 insertions(+), 220 deletions(-) rename bin/{kotlin-client-json-request-date.sh => kotlin-client-json-request-string.sh} (86%) delete mode 100644 bin/windows/kotlin-client-json-request-date.bat create mode 100644 bin/windows/kotlin-client-json-request-string.bat delete mode 100644 samples/client/petstore/kotlin-json-request-date/settings.gradle rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/.openapi-generator-ignore (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/.openapi-generator/VERSION (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/README.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/build.gradle (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/ApiResponse.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Category.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Order.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Pet.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/PetApi.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/StoreApi.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Tag.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/User.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/UserApi.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/pom.xml (96%) create mode 100644 samples/client/petstore/kotlin-json-request-string/settings.gradle rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/apis/PetApi.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/apis/UserApi.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt (94%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Category.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Order.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Pet.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Tag.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/User.kt (100%) diff --git a/bin/ci/kotlin-client-string.json b/bin/ci/kotlin-client-string.json index 52f68e53b44f..cceb366c2ce9 100644 --- a/bin/ci/kotlin-client-string.json +++ b/bin/ci/kotlin-client-string.json @@ -6,6 +6,8 @@ "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", "additionalProperties": { "dateLibrary": "string", - "serializableModel": "true" + "serializableModel": "true", + "sortParamsByRequiredFlag": "false", + "sortModelPropertiesByRequiredFlag": "false" } } \ No newline at end of file diff --git a/bin/kotlin-client-all.sh b/bin/kotlin-client-all.sh index 9fa9ee7de08a..8663752ab529 100755 --- a/bin/kotlin-client-all.sh +++ b/bin/kotlin-client-all.sh @@ -10,4 +10,4 @@ ./bin/kotlin-client-threetenbp.sh ./bin/kotlin-client-nullable.sh ./bin/kotlin-client-retrofit2.sh -./bin/kotlin-client-json-request-date.sh +./bin/kotlin-client-json-request-string.sh diff --git a/bin/kotlin-client-json-request-date.sh b/bin/kotlin-client-json-request-string.sh similarity index 86% rename from bin/kotlin-client-json-request-date.sh rename to bin/kotlin-client-json-request-string.sh index 84ee2b74852a..2e32eed675a6 100755 --- a/bin/kotlin-client-json-request-date.sh +++ b/bin/kotlin-client-json-request-string.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-date --additional-properties requestDateConverter=toJson -o samples/client/petstore/kotlin-json-request-date $@" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-string --additional-properties requestDateConverter=toString -o samples/client/petstore/kotlin-json-request-string $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/windows/kotlin-client-all.bat b/bin/windows/kotlin-client-all.bat index 3833a95c7d11..d4dd27a9f642 100644 --- a/bin/windows/kotlin-client-all.bat +++ b/bin/windows/kotlin-client-all.bat @@ -7,5 +7,5 @@ call powershell -command "& '%~dp0\kotlin-client-petstore.bat'" call powershell -command "& '%~dp0\kotlin-client-string.bat'" call powershell -command "& '%~dp0\kotlin-client-threetenbp.bat'" call powershell -command "& '%~dp0\kotlin-client-nullable.bat'" -call powershell -command "& '%~dp0\kotlin-client-json-request-date.bat'" +call powershell -command "& '%~dp0\kotlin-client-json-request-string.bat'" call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'" \ No newline at end of file diff --git a/bin/windows/kotlin-client-json-request-date.bat b/bin/windows/kotlin-client-json-request-date.bat deleted file mode 100644 index 47fd16af7a0d..000000000000 --- a/bin/windows/kotlin-client-json-request-date.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-json-request-date" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toJson -o samples\client\petstore\kotlin-json-request-date - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-json-request-string.bat b/bin/windows/kotlin-client-json-request-string.bat new file mode 100644 index 000000000000..1b257af02027 --- /dev/null +++ b/bin/windows/kotlin-client-json-request-string.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties +set ags=generate --artifact-id "kotlin-petstore-json-request-string" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toString -o samples\client\petstore\kotlin-json-request-string + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 5c8f71e67920..f65a17b964c6 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -21,4 +21,4 @@ sidebar_label: kotlin |dateLibrary|Option. Date library to use|
**threetenbp-localdatetime**
Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
**string**
String
**java8-localdatetime**
Java 8 native JSR310 (jvm only, for legacy app only)
**java8**
Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
**threetenbp**
Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
|java8| |collectionType|Option. Collection type to use|
**array**
kotlin.Array
**list**
kotlin.collections.List
|array| |library|Library template (sub-template) to use|
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**jvm-retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm-okhttp4| -|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
**toJson**
Date formater option using a json converter.
**toString**
[DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation.
|toString| +|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
**toJson**
[DEFAULT] Date formater option using a json converter.
**toString**
Use the 'toString'-method of the date-time object to retrieve the related string representation.
|toJson| 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 85bffe3f058c..b1d4de7a9b4f 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 @@ -50,7 +50,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { protected static final String VENDOR_EXTENSION_BASE_NAME_LITERAL = "x-base-name-literal"; protected String dateLibrary = DateLibrary.JAVA8.value; - protected String requestDateConverter = RequestDateConverter.TO_STRING.value; + protected String requestDateConverter = RequestDateConverter.TO_JSON.value; protected String collectionType = CollectionType.ARRAY.value; public enum DateLibrary { @@ -143,8 +143,8 @@ public KotlinClientCodegen() { CliOption requestDateConverter = new CliOption(REQUEST_DATE_CONVERTER, "JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)"); Map requestDateConverterOptions = new HashMap<>(); - requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "[DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation."); - requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "Date formater option using a json converter."); + requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "[DEFAULT] Date formater option using a json converter."); + requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "Use the 'toString'-method of the date-time object to retrieve the related string representation."); requestDateConverter.setEnum(requestDateConverterOptions); requestDateConverter.setDefault(this.requestDateConverter); cliOptions.add(requestDateConverter); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache index b446223ba530..238079ca27c0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache @@ -42,7 +42,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#hasQueryParams}} /** @@ -80,7 +80,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache index 2e90275477f9..c1d813aa8054 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache @@ -26,8 +26,14 @@ this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 60d13571cbdd..baa6d54d704c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -24,8 +24,14 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache index 2a3e72fb1c46..f00a6c3b6f7e 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache @@ -4,7 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient; import {{configPackage}}.ClientConfiguration; {{=<% %>=}} -@FeignClient(name="${<%title%>.name:<%title%>}", url="${<%title%>.url:<%basePath%>}", configuration = ClientConfiguration.class) +@FeignClient(name="${<%classVarName%>.name:<%classVarName%>}", url="${<%classVarName%>.url:<%basePath%>}", configuration = ClientConfiguration.class) <%={{ }}=%> public interface {{classname}}Client extends {{classname}} { -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index f1bf09338b70..8a68e9ce2a30 100644 --- a/pom.xml +++ b/pom.xml @@ -1260,7 +1260,7 @@ samples/client/petstore/kotlin-threetenbp/ samples/client/petstore/kotlin-string/ samples/client/petstore/kotlin-moshi-codegen/ - samples/client/petstore/kotlin-json-request-date/ + samples/client/petstore/kotlin-json-request-string/ samples/server/petstore/erlang-server samples/server/petstore/jaxrs/jersey2 diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index 601e2527eedb..17404af4c54d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -181,7 +181,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); + void testEndpointParameters(@Param("number") BigDecimal number, @Param("double") Double _double, @Param("pattern_without_delimiter") String patternWithoutDelimiter, @Param("byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("callback") String paramCallback); /** * To test enum parameters @@ -203,7 +203,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_query_string_array") List enumQueryStringArray, @Param("enum_query_string") String enumQueryString, @Param("enum_query_integer") Integer enumQueryInteger, @Param("enum_query_double") Double enumQueryDouble, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString); /** * To test enum parameters @@ -234,7 +234,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the @@ -276,7 +276,7 @@ public TestEnumParametersQueryParams enumQueryDouble(final Double value) { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + void testGroupParameters(@Param("required_string_group") Integer requiredStringGroup, @Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("required_int64_group") Long requiredInt64Group, @Param("string_group") Integer stringGroup, @Param("boolean_group") Boolean booleanGroup, @Param("int64_group") Long int64Group); /** * Fake endpoint to test group parameters (optional) @@ -304,7 +304,7 @@ public TestEnumParametersQueryParams enumQueryDouble(final Double value) { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + void testGroupParameters(@Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("boolean_group") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index 4996156d28a1..5226f7640860 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,7 +40,7 @@ public interface PetApi extends ApiClient.Api { "Accept: application/json", "api_key: {apiKey}" }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); + void deletePet(@Param("petId") Long petId, @Param("api_key") String apiKey); /** * Finds Pets by status diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java index 30757ed5731e..2dba62319db8 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,7 +24,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - void deleteOrder(@Param("orderId") String orderId); + void deleteOrder(@Param("order_id") String orderId); /** * Returns pet inventories by status @@ -47,7 +47,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - Order getOrderById(@Param("orderId") Long orderId); + Order getOrderById(@Param("order_id") Long orderId); /** * Place an order for a pet diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java index 601e2527eedb..17404af4c54d 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java @@ -181,7 +181,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); + void testEndpointParameters(@Param("number") BigDecimal number, @Param("double") Double _double, @Param("pattern_without_delimiter") String patternWithoutDelimiter, @Param("byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("callback") String paramCallback); /** * To test enum parameters @@ -203,7 +203,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_query_string_array") List enumQueryStringArray, @Param("enum_query_string") String enumQueryString, @Param("enum_query_integer") Integer enumQueryInteger, @Param("enum_query_double") Double enumQueryDouble, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString); /** * To test enum parameters @@ -234,7 +234,7 @@ public TestBodyWithQueryParamsQueryParams query(final String value) { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the @@ -276,7 +276,7 @@ public TestEnumParametersQueryParams enumQueryDouble(final Double value) { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + void testGroupParameters(@Param("required_string_group") Integer requiredStringGroup, @Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("required_int64_group") Long requiredInt64Group, @Param("string_group") Integer stringGroup, @Param("boolean_group") Boolean booleanGroup, @Param("int64_group") Long int64Group); /** * Fake endpoint to test group parameters (optional) @@ -304,7 +304,7 @@ public TestEnumParametersQueryParams enumQueryDouble(final Double value) { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + void testGroupParameters(@Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("boolean_group") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java index 4996156d28a1..5226f7640860 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,7 +40,7 @@ public interface PetApi extends ApiClient.Api { "Accept: application/json", "api_key: {apiKey}" }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); + void deletePet(@Param("petId") Long petId, @Param("api_key") String apiKey); /** * Finds Pets by status diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java index 30757ed5731e..2dba62319db8 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,7 +24,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - void deleteOrder(@Param("orderId") String orderId); + void deleteOrder(@Param("order_id") String orderId); /** * Returns pet inventories by status @@ -47,7 +47,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - Order getOrderById(@Param("orderId") Long orderId); + Order getOrderById(@Param("order_id") Long orderId); /** * Place an order for a pet diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 852894069263..5dcfe3860893 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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.gson.toJson(value, T::class.java).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-json-request-date/settings.gradle b/samples/client/petstore/kotlin-json-request-date/settings.gradle deleted file mode 100644 index 6dde48f7256f..000000000000 --- a/samples/client/petstore/kotlin-json-request-date/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-petstore-json-request-date' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-date/.openapi-generator-ignore b/samples/client/petstore/kotlin-json-request-string/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/.openapi-generator-ignore rename to samples/client/petstore/kotlin-json-request-string/.openapi-generator-ignore diff --git a/samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION rename to samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION diff --git a/samples/client/petstore/kotlin-json-request-date/README.md b/samples/client/petstore/kotlin-json-request-string/README.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/README.md rename to samples/client/petstore/kotlin-json-request-string/README.md diff --git a/samples/client/petstore/kotlin-json-request-date/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/build.gradle rename to samples/client/petstore/kotlin-json-request-string/build.gradle diff --git a/samples/client/petstore/kotlin-json-request-date/docs/ApiResponse.md b/samples/client/petstore/kotlin-json-request-string/docs/ApiResponse.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/ApiResponse.md rename to samples/client/petstore/kotlin-json-request-string/docs/ApiResponse.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Category.md b/samples/client/petstore/kotlin-json-request-string/docs/Category.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Category.md rename to samples/client/petstore/kotlin-json-request-string/docs/Category.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Order.md b/samples/client/petstore/kotlin-json-request-string/docs/Order.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Order.md rename to samples/client/petstore/kotlin-json-request-string/docs/Order.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Pet.md b/samples/client/petstore/kotlin-json-request-string/docs/Pet.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Pet.md rename to samples/client/petstore/kotlin-json-request-string/docs/Pet.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/PetApi.md b/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/PetApi.md rename to samples/client/petstore/kotlin-json-request-string/docs/PetApi.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/StoreApi.md b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/StoreApi.md rename to samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Tag.md b/samples/client/petstore/kotlin-json-request-string/docs/Tag.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Tag.md rename to samples/client/petstore/kotlin-json-request-string/docs/Tag.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/User.md b/samples/client/petstore/kotlin-json-request-string/docs/User.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/User.md rename to samples/client/petstore/kotlin-json-request-string/docs/User.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/UserApi.md b/samples/client/petstore/kotlin-json-request-string/docs/UserApi.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/UserApi.md rename to samples/client/petstore/kotlin-json-request-string/docs/UserApi.md diff --git a/samples/client/petstore/kotlin-json-request-date/pom.xml b/samples/client/petstore/kotlin-json-request-string/pom.xml similarity index 96% rename from samples/client/petstore/kotlin-json-request-date/pom.xml rename to samples/client/petstore/kotlin-json-request-string/pom.xml index 27124bdb9013..947997039a72 100644 --- a/samples/client/petstore/kotlin-json-request-date/pom.xml +++ b/samples/client/petstore/kotlin-json-request-string/pom.xml @@ -1,7 +1,7 @@ 4.0.0 io.swagger - KotlinJsonRequestDateClientTests + KotlinJsonRequestStringClientTests pom 1.0-SNAPSHOT Kotlin Moshi Petstore Client diff --git a/samples/client/petstore/kotlin-json-request-string/settings.gradle b/samples/client/petstore/kotlin-json-request-string/settings.gradle new file mode 100644 index 000000000000..24764e682e75 --- /dev/null +++ b/samples/client/petstore/kotlin-json-request-string/settings.gradle @@ -0,0 +1,2 @@ + +rootProject.name = 'kotlin-petstore-json-request-string' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/PetApi.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/UserApi.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt similarity index 94% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5670d3c132bd..de65b44cd9ae 100644 --- a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,12 +172,6 @@ open class ApiClient(val baseUrl: String) { } 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("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Category.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Order.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Pet.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Tag.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/User.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9ae..5670d3c132bd 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 048c7f724a5a..f786e8d0f2df 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ internal open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9ae..5670d3c132bd 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 4cd448657522..9551a3a0c92c 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -170,6 +170,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9ae..5670d3c132bd 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9ae..5670d3c132bd 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9ae..5670d3c132bd 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .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/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java index ac33f943323d..f80fe4ddc678 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java @@ -3,6 +3,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface PetApiClient extends PetApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java index 0943d581356f..71d613a871dd 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java @@ -3,6 +3,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface StoreApiClient extends StoreApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java index 1933bd82d3a5..1db4598108db 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java @@ -3,6 +3,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface UserApiClient extends UserApi { -} \ No newline at end of file +} 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 0878b2dfe7ba..74afafe55585 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 @@ -45,8 +45,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 070012358683..d14c54e6abac 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 @@ -53,8 +53,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java index ac33f943323d..f80fe4ddc678 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java @@ -3,6 +3,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface PetApiClient extends PetApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java index 0943d581356f..71d613a871dd 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java @@ -3,6 +3,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface StoreApiClient extends StoreApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java index 1933bd82d3a5..1db4598108db 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java @@ -3,6 +3,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface UserApiClient extends UserApi { -} \ No newline at end of file +} 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 0878b2dfe7ba..74afafe55585 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 @@ -45,8 +45,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 070012358683..d14c54e6abac 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 @@ -53,8 +53,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 0878b2dfe7ba..74afafe55585 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 @@ -45,8 +45,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 070012358683..d14c54e6abac 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 @@ -53,8 +53,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 c45d3e54504e..e91680a724ef 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 87bc2feb9245..dcc367e50e4c 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 9592f35f25a1..d57bb6c1de46 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7a4421206d0e..c9b418c6901b 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 85e3c108d488..26b38944e11a 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 1fab3a2e1238..e91bc5697c75 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 9592f35f25a1..d57bb6c1de46 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7a4421206d0e..c9b418c6901b 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 85e3c108d488..26b38944e11a 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 1fab3a2e1238..e91bc5697c75 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 c45d3e54504e..e91680a724ef 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 9592f35f25a1..d57bb6c1de46 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7a4421206d0e..c9b418c6901b 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 85e3c108d488..26b38944e11a 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 1fab3a2e1238..e91bc5697c75 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 c45d3e54504e..e91680a724ef 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 c45d3e54504e..e91680a724ef 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 c45d3e54504e..e91680a724ef 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 dbf421619521..aad86c60481e 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 89cbe6c4cafd..b98ba1e2fa12 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 25585cdcede4..d2346d758a63 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 31286ef24fa0..02adc43755a7 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 e5b7493db166..cc61c7818af9 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 d2d385b401f0..0e2354891e5b 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 4075aecc8faa..2df7246dbb5f 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 a0dbf4671d9c..ef0bba51c505 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 78398cd43a9f..052fdc5308bb 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 21a2f37430a3..9bc946d6cc1a 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 @@ -35,8 +35,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 6e595fd47620..9a57d85eecad 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 @@ -33,8 +33,12 @@ public enum KindEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 3c0ea1ea75a5..7ee6a9816197 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 @@ -31,8 +31,12 @@ public enum JustSymbolEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public enum ArrayEnumEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 fd156263f3ab..ef4719c757f0 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 @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 7c93e03bbb00..8eff3e0c49aa 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 @@ -32,8 +32,12 @@ public enum EnumStringEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public enum EnumStringRequiredEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public enum EnumIntegerEnum { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public enum EnumNumberEnum { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 19a6db9cb155..80195fc3d4be 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 @@ -36,8 +36,12 @@ public enum InnerEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 c45d3e54504e..e91680a724ef 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 @@ -44,8 +44,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 59c416ba0fa4..6b5abc576b07 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 @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } 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 5bea5f27a195..c30fc1653d41 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 @@ -52,8 +52,12 @@ public enum StatusEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } From a42ff37a42479690217bb5b8cb887d707d5f8fba Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Mon, 27 Jan 2020 14:23:20 +0100 Subject: [PATCH 09/72] [java][client] oneOf support for jackson clients (#5120) --- .../codegen/CodegenDiscriminator.java | 18 ++ .../openapitools/codegen/DefaultCodegen.java | 9 +- .../codegen/languages/JavaClientCodegen.java | 275 +++++++++++++++++- .../src/main/resources/Java/model.mustache | 2 +- .../main/resources/Java/model_test.mustache | 2 + .../resources/Java/oneof_interface.mustache | 6 + .../src/main/resources/Java/pojo.mustache | 2 +- .../src/main/resources/Java/pojo_doc.mustache | 19 +- .../Java/typeInfoAnnotation.mustache | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../docs/AdditionalPropertiesAnyType.md | 4 + .../docs/AdditionalPropertiesArray.md | 4 + .../docs/AdditionalPropertiesBoolean.md | 4 + .../docs/AdditionalPropertiesClass.md | 4 + .../docs/AdditionalPropertiesInteger.md | 4 + .../docs/AdditionalPropertiesNumber.md | 4 + .../docs/AdditionalPropertiesObject.md | 4 + .../docs/AdditionalPropertiesString.md | 4 + .../docs/Animal.md | 4 + .../docs/ArrayOfArrayOfNumberOnly.md | 4 + .../docs/ArrayOfNumberOnly.md | 4 + .../docs/ArrayTest.md | 4 + .../docs/BigCat.md | 4 + .../docs/BigCatAllOf.md | 4 + .../docs/Capitalization.md | 4 + .../okhttp-gson-parcelableModel/docs/Cat.md | 4 + .../docs/CatAllOf.md | 4 + .../docs/Category.md | 4 + .../docs/ClassModel.md | 4 + .../docs/Client.md | 4 + .../okhttp-gson-parcelableModel/docs/Dog.md | 4 + .../docs/DogAllOf.md | 4 + .../docs/EnumArrays.md | 4 + .../docs/EnumTest.md | 4 + .../docs/FileSchemaTestClass.md | 4 + .../docs/FormatTest.md | 4 + .../docs/HasOnlyReadOnly.md | 4 + .../docs/MapTest.md | 4 + ...dPropertiesAndAdditionalPropertiesClass.md | 4 + .../docs/Model200Response.md | 4 + .../docs/ModelApiResponse.md | 4 + .../docs/ModelReturn.md | 4 + .../okhttp-gson-parcelableModel/docs/Name.md | 4 + .../docs/NumberOnly.md | 4 + .../okhttp-gson-parcelableModel/docs/Order.md | 4 + .../docs/OuterComposite.md | 4 + .../okhttp-gson-parcelableModel/docs/Pet.md | 4 + .../docs/ReadOnlyFirst.md | 4 + .../docs/SpecialModelName.md | 4 + .../okhttp-gson-parcelableModel/docs/Tag.md | 4 + .../docs/TypeHolderDefault.md | 4 + .../docs/TypeHolderExample.md | 4 + .../okhttp-gson-parcelableModel/docs/User.md | 4 + .../docs/XmlItem.md | 4 + .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- .../org/openapitools/client/model/Animal.java | 2 +- 69 files changed, 521 insertions(+), 22 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java index 9b548e8b5498..73d85052e70d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java @@ -10,6 +10,8 @@ public class CodegenDiscriminator { private String propertyName; private String propertyBaseName; + private String propertyGetter; + private String propertyType; private Map mapping; private Set mappedModels = new LinkedHashSet<>(); @@ -21,6 +23,14 @@ public void setPropertyName(String propertyName) { this.propertyName = propertyName; } + public String getPropertyGetter() { + return propertyGetter; + } + + public void setPropertyGetter(String propertyGetter) { + this.propertyGetter = propertyGetter; + } + public String getPropertyBaseName() { return propertyBaseName; } @@ -29,6 +39,14 @@ public void setPropertyBaseName(String propertyBaseName) { this.propertyBaseName = propertyBaseName; } + public String getPropertyType() { + return propertyType; + } + + public void setPropertyType(String propertyType) { + this.propertyType = propertyType; + } + public Map getMapping() { return mapping; } 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 45677bb61e6a..dba4783d282b 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 @@ -1663,6 +1663,10 @@ public String toAnyOfName(List names, ComposedSchema composedSchema) { */ @SuppressWarnings("static-method") public String toOneOfName(List names, ComposedSchema composedSchema) { + Map exts = composedSchema.getExtensions(); + if (exts != null && exts.containsKey("x-oneOf-name")) { + return (String) exts.get("x-oneOf-name"); + } return "oneOf<" + String.join(",", names) + ">"; } @@ -2126,13 +2130,16 @@ public int compare(CodegenProperty one, CodegenProperty another) { return m; } - private CodegenDiscriminator createDiscriminator(String schemaName, Schema schema) { + protected CodegenDiscriminator createDiscriminator(String schemaName, Schema schema) { if (schema.getDiscriminator() == null) { return null; } CodegenDiscriminator discriminator = new CodegenDiscriminator(); discriminator.setPropertyName(toVarName(schema.getDiscriminator().getPropertyName())); discriminator.setPropertyBaseName(schema.getDiscriminator().getPropertyName()); + discriminator.setPropertyGetter(toGetter(discriminator.getPropertyName())); + // FIXME: for now, we assume that the discriminator property is String + discriminator.setPropertyType(typeMapping.get("string")); discriminator.setMapping(schema.getDiscriminator().getMapping()); if (schema.getDiscriminator().getMapping() != null && !schema.getDiscriminator().getMapping().isEmpty()) { for (Entry e : schema.getDiscriminator().getMapping().entrySet()) { 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 4fbba05d8200..571717ceb27d 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 @@ -25,12 +25,19 @@ import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.templating.mustache.CaseFormatLambda; +import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.RequestBody; +import io.swagger.v3.oas.models.responses.ApiResponse; import java.io.File; import java.util.*; @@ -103,6 +110,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen protected String authFolder; protected String serializationLibrary = null; + protected boolean useOneOfInterfaces = false; + protected List addOneOfInterfaces = new ArrayList(); + public JavaClientCodegen() { super(); @@ -488,6 +498,10 @@ else if (MICROPROFILE.equals(getLibrary())) { additionalProperties.remove(SERIALIZATION_LIBRARY_GSON); } + if (additionalProperties.containsKey(SERIALIZATION_LIBRARY_JACKSON)) { + useOneOfInterfaces = true; + } + } private boolean usesAnyRetrofitLibrary() { @@ -712,9 +726,10 @@ public Map postProcessModelsEnum(Map objs) { @Override public Map postProcessModels(Map objs) { objs = super.postProcessModels(objs); + List models = (List) objs.get("models"); + if (additionalProperties.containsKey(SERIALIZATION_LIBRARY_JACKSON) && !JERSEY1.equals(getLibrary())) { List> imports = (List>) objs.get("imports"); - List models = (List) objs.get("models"); for (Object _mo : models) { Map mo = (Map) _mo; CodegenModel cm = (CodegenModel) mo.get("model"); @@ -741,6 +756,20 @@ public Map postProcessModels(Map objs) { } } + // add implements for serializable/parcelable to all models + for (Object _mo : models) { + Map mo = (Map) _mo; + CodegenModel cm = (CodegenModel) mo.get("model"); + cm.getVendorExtensions().putIfAbsent("implements", new ArrayList()); + List impl = (List) cm.getVendorExtensions().get("implements"); + if (this.parcelableModel) { + impl.add("Parcelable"); + } + if (this.serializableModel) { + impl.add("Serializable"); + } + } + return objs; } @@ -816,6 +845,250 @@ public void setSerializationLibrary(String serializationLibrary) { } } + public void addOneOfNameExtension(Schema s, String name) { + ComposedSchema cs = (ComposedSchema) s; + if (cs.getOneOf() != null && cs.getOneOf().size() > 0) { + cs.addExtension("x-oneOf-name", name); + } + } + + public void addOneOfInterfaceModel(ComposedSchema cs, String type) { + CodegenModel cm = new CodegenModel(); + + for (Schema o : cs.getOneOf()) { + // TODO: inline objects + cm.oneOf.add(toModelName(ModelUtils.getSimpleRef(o.get$ref()))); + } + cm.name = type; + cm.classname = type; + cm.vendorExtensions.put("isOneOfInterface", true); + cm.discriminator = createDiscriminator("", (Schema) cs); + cm.interfaceModels = new ArrayList(); + + addOneOfInterfaces.add(cm); + } + + @Override + public void preprocessOpenAPI(OpenAPI openAPI) { + // we process the openapi schema here to find oneOf schemas here and create interface models for them + super.preprocessOpenAPI(openAPI); + Map schemas = new HashMap(openAPI.getComponents().getSchemas()); + if (schemas == null) { + schemas = new HashMap(); + } + Map pathItems = openAPI.getPaths(); + + // we need to add all request and response bodies to processed schemas + if (pathItems != null) { + for (Map.Entry e : pathItems.entrySet()) { + for (Map.Entry op : e.getValue().readOperationsMap().entrySet()) { + String opId = getOrGenerateOperationId(op.getValue(), e.getKey(), op.getKey().toString()); + // process request body + RequestBody b = ModelUtils.getReferencedRequestBody(openAPI, op.getValue().getRequestBody()); + Schema requestSchema = null; + if (b != null) { + requestSchema = ModelUtils.getSchemaFromRequestBody(b); + } + if (requestSchema != null) { + schemas.put(opId, requestSchema); + } + // process all response bodies + for (Map.Entry ar : op.getValue().getResponses().entrySet()) { + ApiResponse a = ModelUtils.getReferencedApiResponse(openAPI, ar.getValue()); + Schema responseSchema = ModelUtils.getSchemaFromResponse(a); + if (responseSchema != null) { + schemas.put(opId + ar.getKey(), responseSchema); + } + } + } + } + } + + for (Map.Entry e : schemas.entrySet()) { + String n = toModelName(e.getKey()); + Schema s = e.getValue(); + String nOneOf = toModelName(n + "OneOf"); + if (ModelUtils.isComposedSchema(s)) { + addOneOfNameExtension(s, n); + } else if (ModelUtils.isArraySchema(s)) { + Schema items = ((ArraySchema) s).getItems(); + if (ModelUtils.isComposedSchema(items)) { + addOneOfNameExtension(items, nOneOf); + addOneOfInterfaceModel((ComposedSchema) items, nOneOf); + } + } else if (ModelUtils.isMapSchema(s)) { + Schema addProps = ModelUtils.getAdditionalProperties(s); + if (addProps != null && ModelUtils.isComposedSchema(addProps)) { + addOneOfNameExtension(addProps, nOneOf); + addOneOfInterfaceModel((ComposedSchema) addProps, nOneOf); + } + } + } + } + + private class OneOfImplementorAdditionalData { + private String implementorName; + private List additionalInterfaces = new ArrayList(); + private List additionalProps = new ArrayList(); + private List> additionalImports = new ArrayList>(); + + public OneOfImplementorAdditionalData(String implementorName) { + this.implementorName = implementorName; + } + + public String getImplementorName() { + return implementorName; + } + + public void addFromInterfaceModel(CodegenModel cm, List> modelsImports) { + // Add cm as implemented interface + additionalInterfaces.add(cm.classname); + + // Add all vars defined on cm + // a "oneOf" model (cm) by default inherits all properties from its "interfaceModels", + // but we only want to add properties defined on cm itself + List toAdd = new ArrayList(cm.vars); + // note that we can't just toAdd.removeAll(m.vars) for every interfaceModel, + // as they might have different value of `hasMore` and thus are not equal + List omitAdding = new ArrayList(); + for (CodegenModel m : cm.interfaceModels) { + for (CodegenProperty v : m.vars) { + omitAdding.add(v.baseName); + } + } + for (CodegenProperty v : toAdd) { + if (!omitAdding.contains(v.baseName)) { + additionalProps.add(v.clone()); + } + } + + // Add all imports of cm + for (Map importMap : modelsImports) { + // we're ok with shallow clone here, because imports are strings only + additionalImports.add(new HashMap(importMap)); + } + } + + public void addToImplementor(CodegenModel implcm, List> implImports) { + implcm.getVendorExtensions().putIfAbsent("implements", new ArrayList()); + + // Add implemented interfaces + for (String intf : additionalInterfaces) { + List impl = (List) implcm.getVendorExtensions().get("implements"); + impl.add(intf); + // Add imports for interfaces + implcm.imports.add(intf); + Map importsItem = new HashMap(); + importsItem.put("import", toModelImport(intf)); + implImports.add(importsItem); + } + + // Add oneOf-containing models properties - we need to properly set the hasMore values to make renderind correct + if (implcm.vars.size() > 0 && additionalProps.size() > 0) { + implcm.vars.get(implcm.vars.size() - 1).hasMore = true; + } + for (int i = 0; i < additionalProps.size(); i++) { + CodegenProperty var = additionalProps.get(i); + if (i == additionalProps.size() - 1) { + var.hasMore = false; + } else { + var.hasMore = true; + } + implcm.vars.add(var); + } + + // Add imports + for (Map oneImport : additionalImports) { + // exclude imports from this package - these are imports that only the oneOf interface needs + if (!implImports.contains(oneImport) && !oneImport.getOrDefault("import", "").startsWith(modelPackage())) { + implImports.add(oneImport); + } + } + } + } + + @Override + public Map postProcessAllModels(Map objs) { + objs = super.postProcessAllModels(objs); + + if (this.useOneOfInterfaces) { + // First, add newly created oneOf interfaces + for (CodegenModel cm : addOneOfInterfaces) { + Map modelValue = new HashMap() {{ + putAll(additionalProperties()); + put("model", cm); + }}; + List modelsValue = Arrays.asList(modelValue); + List> importsValue = new ArrayList>(); + for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo")) { + Map oneImport = new HashMap() {{ + put("import", importMapping.get(i)); + }}; + importsValue.add(oneImport); + } + Map objsValue = new HashMap() {{ + put("models", modelsValue); + put("package", modelPackage()); + put("imports", importsValue); + put("classname", cm.classname); + putAll(additionalProperties); + }}; + objs.put(cm.name, objsValue); + } + + // - Add all "oneOf" models as interfaces to be implemented by the models that + // are the choices in "oneOf"; also mark the models containing "oneOf" as interfaces + // - Add all properties of "oneOf" to the implementing classes (NOTE that this + // would be problematic if the class was in multiple such "oneOf" models, in which + // case it would get all their properties, but it's probably better than not doing this) + // - Add all imports of "oneOf" model to all the implementing classes (this might not + // be optimal, as it can contain more than necessary, but it's good enough) + Map additionalDataMap = new HashMap(); + for (Map.Entry modelsEntry : objs.entrySet()) { + Map modelsAttrs = (Map) modelsEntry.getValue(); + List models = (List) modelsAttrs.get("models"); + List> modelsImports = (List>) modelsAttrs.getOrDefault("imports", new ArrayList>()); + for (Object _mo : models) { + Map mo = (Map) _mo; + CodegenModel cm = (CodegenModel) mo.get("model"); + if (cm.oneOf.size() > 0) { + cm.vendorExtensions.put("isOneOfInterface", true); + // if this is oneOf interface, make sure we include the necessary jackson imports for it + for (String s : Arrays.asList("JsonTypeInfo", "JsonSubTypes")) { + Map i = new HashMap() {{ + put("import", importMapping.get(s)); + }}; + if (!modelsImports.contains(i)) { + modelsImports.add(i); + } + } + for (String one : cm.oneOf) { + if (!additionalDataMap.containsKey(one)) { + additionalDataMap.put(one, new OneOfImplementorAdditionalData(one)); + } + additionalDataMap.get(one).addFromInterfaceModel(cm, modelsImports); + } + } + } + } + + for (Map.Entry modelsEntry : objs.entrySet()) { + Map modelsAttrs = (Map) modelsEntry.getValue(); + List models = (List) modelsAttrs.get("models"); + List> imports = (List>) modelsAttrs.get("imports"); + for (Object _implmo : models) { + Map implmo = (Map) _implmo; + CodegenModel implcm = (CodegenModel) implmo.get("model"); + if (additionalDataMap.containsKey(implcm.name)) { + additionalDataMap.get(implcm.name).addToImplementor(implcm, imports); + } + } + } + } + + return objs; + } + public void forceSerializationLibrary(String serializationLibrary) { if((this.serializationLibrary != null) && !this.serializationLibrary.equalsIgnoreCase(serializationLibrary)) { LOGGER.warn("The configured serializationLibrary '" + this.serializationLibrary + "', is not supported by the library: '" + getLibrary() + "', switching back to: " + serializationLibrary); diff --git a/modules/openapi-generator/src/main/resources/Java/model.mustache b/modules/openapi-generator/src/main/resources/Java/model.mustache index 2194bbfdb39c..8763e3bd08bb 100644 --- a/modules/openapi-generator/src/main/resources/Java/model.mustache +++ b/modules/openapi-generator/src/main/resources/Java/model.mustache @@ -42,6 +42,6 @@ import org.hibernate.validator.constraints.*; {{#models}} {{#model}} -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.isOneOfInterface}}{{>oneof_interface}}{{/vendorExtensions.isOneOfInterface}}{{^vendorExtensions.isOneOfInterface}}{{>pojo}}{{/vendorExtensions.isOneOfInterface}}{{/isEnum}} {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/Java/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/model_test.mustache index e72796cdb93c..0258f350074c 100644 --- a/modules/openapi-generator/src/main/resources/Java/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/model_test.mustache @@ -21,6 +21,7 @@ import java.util.Map; public class {{classname}}Test { {{#models}} {{#model}} + {{^vendorExtensions.isOneOfInterface}} {{^isEnum}} private final {{classname}} model = new {{classname}}(); @@ -43,6 +44,7 @@ public class {{classname}}Test { } {{/allVars}} + {{/vendorExtensions.isOneOfInterface}} {{/model}} {{/models}} } diff --git a/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache new file mode 100644 index 000000000000..c17cf0b31ca1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache @@ -0,0 +1,6 @@ +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} +public interface {{classname}} {{#vendorExtensions.implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.implements}} { + {{#discriminator}} + public {{propertyType}} {{propertyGetter}}(); + {{/discriminator}} +} diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index 796f9a7ec141..3386b1b969a6 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -10,7 +10,7 @@ }) {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} -public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcelableModel}}implements Parcelable {{#serializableModel}}, Serializable {{/serializableModel}}{{/parcelableModel}}{{^parcelableModel}}{{#serializableModel}}implements Serializable {{/serializableModel}}{{/parcelableModel}}{ +public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; diff --git a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache index 313e61ba7e6e..e63db5e27209 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache @@ -1,7 +1,8 @@ -# {{classname}} +# {{#vendorExtensions.isOneOfInterface}}Interface {{/vendorExtensions.isOneOfInterface}}{{classname}} {{#description}}{{&description}} {{/description}} +{{^vendorExtensions.isOneOfInterface}} ## Properties Name | Type | Description | Notes @@ -17,3 +18,19 @@ Name | Value ---- | -----{{#allowableValues}}{{#enumVars}} {{name}} | {{value}}{{/enumVars}}{{/allowableValues}} {{/isEnum}}{{/vars}} +{{#vendorExtensions.implements.0}} + +## Implemented Interfaces + +{{#vendorExtensions.implements}} +* {{{.}}} +{{/vendorExtensions.implements}} +{{/vendorExtensions.implements.0}} +{{/vendorExtensions.isOneOfInterface}} +{{#vendorExtensions.isOneOfInterface}} +## Implementing Classes + +{{#oneOf}} +* {{{.}}} +{{/oneOf}} +{{/vendorExtensions.isOneOfInterface}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache index a8ab10768e68..81c2ba05f903 100644 --- a/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache @@ -1,6 +1,6 @@ {{#jackson}} -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java index 714c03c8e783..00db7a1b7b6d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java @@ -34,7 +34,7 @@ }) @javax.annotation.concurrent.Immutable -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java index 741e51b2a6e9..b5b4f315c165 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java @@ -32,7 +32,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md index 87b468bb7ca3..34c14b52bf20 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesAnyType.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md index cb7fe9b3903d..6a791da7106a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesArray.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md index 6b53e7ba73a1..930bfd1a5acf 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesBoolean.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md index 36e181620016..30d3a23d8cac 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md @@ -19,4 +19,8 @@ Name | Type | Description | Notes **anytype3** | [**Object**](.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md index d2ed7fb1a460..7629f5f50c83 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesInteger.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md index 53f6e81e7176..6a745f35b635 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesNumber.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md index 98ac8d2e5fe0..060b7bdd6c0b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesObject.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md index d7970cdfe190..5b0385e52a08 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesString.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md index c8e18ae55e4f..cd162bd797de 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Animal.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **color** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md index a48aa23e78ee..4837dc1710b3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfArrayOfNumberOnly.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md index fa2909211a07..410688d7e9db 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayOfNumberOnly.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md index 9ad1c9814a51..b34fafc372f7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ArrayTest.md @@ -11,4 +11,8 @@ Name | Type | Description | Notes **arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md index 8a075304abf8..eec91a458027 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCat.md @@ -20,4 +20,8 @@ LEOPARDS | "leopards" JAGUARS | "jaguars" +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md index 21177dbf089d..d4c713b3e96e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md @@ -20,4 +20,8 @@ LEOPARDS | "leopards" JAGUARS | "jaguars" +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md index 7b73c40b5545..d7b56a6b99cc 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Capitalization.md @@ -14,4 +14,8 @@ Name | Type | Description | Notes **ATT_NAME** | **String** | Name of the pet | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md index 39c2f864df88..7c35c8fdba5c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Cat.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **declawed** | **Boolean** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md index 1098fd900c5d..c8b100487006 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **declawed** | **Boolean** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md index 613ea9f7ee24..eaa76f6bb226 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Category.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **name** | **String** | | +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md index d5453c20133a..ede422e87c2f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ClassModel.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **propertyClass** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md index 228df492383f..149537224cc5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Client.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **client** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md index 73cedf2bc919..ffb0e9d2dc0d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Dog.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **breed** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md index cbeb9e9a22df..1ed266a241da 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **breed** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md index 869b7a6c066d..f1193deea423 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumArrays.md @@ -28,4 +28,8 @@ FISH | "fish" CRAB | "crab" +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md index 61eb95f22fe9..d97f8dba04b5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/EnumTest.md @@ -51,4 +51,8 @@ NUMBER_1_DOT_1 | 1.1 NUMBER_MINUS_1_DOT_2 | -1.2 +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md index 3a95e27d7c09..69ba61e421bb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FileSchemaTestClass.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **files** | [**List<java.io.File>**](java.io.File.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md index d138e921902a..23ae5975ddbd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FormatTest.md @@ -22,4 +22,8 @@ Name | Type | Description | Notes **bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md index 4795b40ef65e..b79bfb108f53 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/HasOnlyReadOnly.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **foo** | **String** | | [optional] [readonly] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md index c35c3cf2c0be..b8c5d4519d52 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md @@ -21,4 +21,8 @@ UPPER | "UPPER" LOWER | "lower" +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 3dc283ae4936..171e8d6d161c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -11,4 +11,8 @@ Name | Type | Description | Notes **map** | [**Map<String, Animal>**](Animal.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md index f9928d70622c..9ba2d6a0f9cd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Model200Response.md @@ -11,4 +11,8 @@ Name | Type | Description | Notes **propertyClass** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md index 14fb7f1ed27b..02b3abc589e5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelApiResponse.md @@ -11,4 +11,8 @@ Name | Type | Description | Notes **message** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md index 5005d4b72392..44ef6c4dfcb8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ModelReturn.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **_return** | **Integer** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md index b815a0b4c994..d439eec4bb6c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Name.md @@ -13,4 +13,8 @@ Name | Type | Description | Notes **_123number** | **Integer** | | [optional] [readonly] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md index 1c12b6adf3bd..f3534eb5d838 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/NumberOnly.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md index 409fc4cc9616..ae879c241b44 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Order.md @@ -24,4 +24,8 @@ APPROVED | "approved" DELIVERED | "delivered" +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md index e06292218847..4ce678abed34 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OuterComposite.md @@ -11,4 +11,8 @@ Name | Type | Description | Notes **myBoolean** | **Boolean** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md index 37ac007b7931..a64a5b131dc5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Pet.md @@ -24,4 +24,8 @@ PENDING | "pending" SOLD | "sold" +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md index a692499dc661..5702a47fb52f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/ReadOnlyFirst.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **baz** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md index 934b8f0f25d7..ec66e930bdf4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SpecialModelName.md @@ -9,4 +9,8 @@ Name | Type | Description | Notes **$specialPropertyName** | **Long** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md index f24eba7d222e..0bb43f42f244 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/Tag.md @@ -10,4 +10,8 @@ Name | Type | Description | Notes **name** | **String** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md index a338fc900cb1..51542d07e473 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderDefault.md @@ -13,4 +13,8 @@ Name | Type | Description | Notes **arrayItem** | **List<Integer>** | | +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md index f8858da60664..eb9f10825b6a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/TypeHolderExample.md @@ -14,4 +14,8 @@ Name | Type | Description | Notes **arrayItem** | **List<Integer>** | | +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md index c4ea94b7fc17..76046312d5d7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/User.md @@ -16,4 +16,8 @@ Name | Type | Description | Notes **userStatus** | **Integer** | User Status | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md index 6065fd1f4e59..6c2cf6775535 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/XmlItem.md @@ -37,4 +37,8 @@ Name | Type | Description | Notes **prefixNsWrappedArray** | **List<Integer>** | | [optional] +## Implemented Interfaces + +* Parcelable + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java index 9b0fa3ff89d8..af9c0df70387 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java @@ -35,7 +35,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java index 6f607263996a..38b0a1b2f159 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/Animal.java @@ -35,7 +35,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java index 6f607263996a..38b0a1b2f159 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/Animal.java @@ -35,7 +35,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java index 6f607263996a..38b0a1b2f159 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java @@ -35,7 +35,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java index a17f713859c3..e0ae875483bd 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ Animal.JSON_PROPERTY_COLOR }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), From f152a22094020e7457face6f0cf09ff030702404 Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Wed, 29 Jan 2020 08:34:51 +0800 Subject: [PATCH 10/72] [C-libcurl] Add object.c to CMakeLists to compile (#5130) * [C-libcurl] Add object.c to CMakeLists to compile * [C-libcurl] Add object.h/object.c to CMakeLists of sample --- .../src/main/resources/C-libcurl/CMakeLists.txt.mustache | 2 ++ samples/client/petstore/c/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 060f8f75eb37..76c0470f008b 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -23,6 +23,7 @@ set(SRCS src/apiKey.c src/apiClient.c external/cJSON.c + model/object.c {{#models}} {{#model}} model/{{classname}}.c @@ -43,6 +44,7 @@ set(HDRS include/list.h include/keyValuePair.h external/cJSON.h + model/object.h {{#models}} {{#model}} model/{{classname}}.h diff --git a/samples/client/petstore/c/CMakeLists.txt b/samples/client/petstore/c/CMakeLists.txt index e685f785ddef..98454803ef5f 100644 --- a/samples/client/petstore/c/CMakeLists.txt +++ b/samples/client/petstore/c/CMakeLists.txt @@ -23,6 +23,7 @@ set(SRCS src/apiKey.c src/apiClient.c external/cJSON.c + model/object.c model/api_response.c model/category.c model/order.c @@ -40,6 +41,7 @@ set(HDRS include/list.h include/keyValuePair.h external/cJSON.h + model/object.h model/api_response.h model/category.h model/order.h From d627282e890d1b82de5285e99643ce1f3c1ff196 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Tue, 28 Jan 2020 20:29:10 -0500 Subject: [PATCH 11/72] [go] Allow user overrides for generated outputs (#5132) --- .../codegen/languages/GoGinServerCodegen.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java index 632d4c3eb262..7d0d0990acc4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java @@ -131,16 +131,30 @@ public void processOpts() { setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); } else { setPackageName("openapi"); + additionalProperties.put(CodegenConstants.PACKAGE_NAME, this.packageName); } /* * Additional Properties. These values can be passed to the templates and * are available in models, apis, and supporting files */ - additionalProperties.put("apiVersion", apiVersion); - additionalProperties.put("serverPort", serverPort); - additionalProperties.put("apiPath", apiPath); - additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); + if (additionalProperties.containsKey("apiVersion")) { + this.apiVersion = (String)additionalProperties.get("apiVersion"); + } else { + additionalProperties.put("apiVersion", apiVersion); + } + + if (additionalProperties.containsKey("serverPort")) { + this.serverPort = Integer.parseInt((String)additionalProperties.get("serverPort")); + } else { + additionalProperties.put("serverPort", serverPort); + } + + if (additionalProperties.containsKey("apiPath")) { + this.apiPath = (String)additionalProperties.get("apiPath"); + } else { + additionalProperties.put("apiPath", apiPath); + } modelPackage = packageName; apiPackage = packageName; From 15345e1620dcbaaff9de4a0a3482e9ffc5255c3a Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Tue, 28 Jan 2020 21:58:11 -0800 Subject: [PATCH 12/72] [python] Cleanup ThreadPool with atexit rather than __del__ (#5094) * [python] Cleanup ThreadPool with atexit rather than __del__ This removes the `__del__` function from the generated Python client, and replaces it with a `cleanup` function. When a ThreadPool is created, the cleanup function is registered with the `atexit` module. This fixes #5093, where the API client could hang indefinitely at garbage collection. * Update petstore examples * Test to ensure threadpool is cleaned up * Docs now encourage using the context manager * Regenerate docs * Update samples --- .../main/resources/python/api_client.mustache | 12 +- .../resources/python/api_doc_example.mustache | 32 +- .../resources/python/common_README.mustache | 24 +- .../README_common.mustache | 24 +- .../python-experimental/api_client.mustache | 12 +- .../api_doc_example.mustache | 86 ++-- .../client/petstore/python-asyncio/README.md | 24 +- .../python-asyncio/docs/AnotherFakeApi.md | 22 +- .../petstore/python-asyncio/docs/FakeApi.md | 262 ++++++------ .../docs/FakeClassnameTags123Api.md | 22 +- .../petstore/python-asyncio/docs/PetApi.md | 182 +++++---- .../petstore/python-asyncio/docs/StoreApi.md | 84 ++-- .../petstore/python-asyncio/docs/UserApi.md | 158 ++++---- .../python-asyncio/petstore_api/api_client.py | 12 +- .../petstore/python-experimental/README.md | 24 +- .../docs/AnotherFakeApi.md | 24 +- .../python-experimental/docs/FakeApi.md | 380 ++++++++++-------- .../docs/FakeClassnameTags123Api.md | 24 +- .../python-experimental/docs/PetApi.md | 282 +++++++------ .../python-experimental/docs/StoreApi.md | 92 +++-- .../python-experimental/docs/UserApi.md | 182 +++++---- .../petstore_api/api_client.py | 12 +- .../tests/test_api_client.py | 16 + .../client/petstore/python-tornado/README.md | 24 +- .../python-tornado/docs/AnotherFakeApi.md | 22 +- .../petstore/python-tornado/docs/FakeApi.md | 262 ++++++------ .../docs/FakeClassnameTags123Api.md | 22 +- .../petstore/python-tornado/docs/PetApi.md | 182 +++++---- .../petstore/python-tornado/docs/StoreApi.md | 84 ++-- .../petstore/python-tornado/docs/UserApi.md | 158 ++++---- .../python-tornado/petstore_api/api_client.py | 12 +- samples/client/petstore/python/README.md | 24 +- .../petstore/python/docs/AnotherFakeApi.md | 22 +- .../client/petstore/python/docs/FakeApi.md | 262 ++++++------ .../python/docs/FakeClassnameTags123Api.md | 22 +- samples/client/petstore/python/docs/PetApi.md | 182 +++++---- .../client/petstore/python/docs/StoreApi.md | 84 ++-- .../client/petstore/python/docs/UserApi.md | 158 ++++---- .../python/petstore_api/api_client.py | 12 +- .../petstore/python/tests/test_api_client.py | 16 + .../petstore/python-experimental/README.md | 24 +- .../docs/AnotherFakeApi.md | 24 +- .../python-experimental/docs/DefaultApi.md | 20 +- .../python-experimental/docs/FakeApi.md | 366 +++++++++-------- .../docs/FakeClassnameTags123Api.md | 24 +- .../python-experimental/docs/PetApi.md | 282 +++++++------ .../python-experimental/docs/StoreApi.md | 92 +++-- .../python-experimental/docs/UserApi.md | 182 +++++---- .../petstore_api/api_client.py | 12 +- .../openapi3/client/petstore/python/README.md | 24 +- .../petstore/python/docs/AnotherFakeApi.md | 22 +- .../client/petstore/python/docs/DefaultApi.md | 18 +- .../client/petstore/python/docs/FakeApi.md | 262 ++++++------ .../python/docs/FakeClassnameTags123Api.md | 22 +- .../client/petstore/python/docs/PetApi.md | 182 +++++---- .../client/petstore/python/docs/StoreApi.md | 84 ++-- .../client/petstore/python/docs/UserApi.md | 158 ++++---- .../python/petstore_api/api_client.py | 12 +- 58 files changed, 2968 insertions(+), 2382 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 8297ad57984d..08de3bab85e9 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -2,6 +2,7 @@ {{>partial_header}} from __future__ import absolute_import +import atexit import datetime from dateutil.parser import parse import json @@ -75,11 +76,19 @@ class ApiClient(object): self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' self.client_side_validation = configuration.client_side_validation - def __del__(self): + 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): @@ -87,6 +96,7 @@ class ApiClient(object): 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 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 f2d6117a7ce1..e86c5d6011cc 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 @@ -8,22 +8,26 @@ from pprint import pprint {{#hasAuthMethods}} # Defining host is optional and default to {{{basePath}}} configuration.host = "{{{basePath}}}" -# Create an instance of the API class -api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) -{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/allParams}} +# 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 = {{{packageName}}}.{{{classname}}}(api_client) + {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} {{/hasAuthMethods}} {{^hasAuthMethods}} -# Create an instance of the API class -api_instance = {{{packageName}}}.{{{classname}}}() -{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/allParams}} +# Enter a context with an instance of the API client +with {{{packageName}}}.ApiClient() as api_client: + # Create an instance of the API class + api_instance = {{{packageName}}}.{{{classname}}}(api_client) + {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} {{/hasAuthMethods}} -try: -{{#summary}} # {{{.}}} -{{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} - pprint(api_response){{/returnType}} -except ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) + try: + {{#summary}} # {{{.}}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} + pprint(api_response){{/returnType}} + except ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) ``` diff --git a/modules/openapi-generator/src/main/resources/python/common_README.mustache b/modules/openapi-generator/src/main/resources/python/common_README.mustache index 7de8c9ef0985..991002aa17cd 100644 --- a/modules/openapi-generator/src/main/resources/python/common_README.mustache +++ b/modules/openapi-generator/src/main/resources/python/common_README.mustache @@ -8,18 +8,20 @@ from pprint import pprint {{> python_doc_auth_partial}} # Defining host is optional and default to {{{basePath}}} configuration.host = "{{{basePath}}}" -# Create an instance of the API class -api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) -{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/allParams}} +# 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 = {{{packageName}}}.{{{classname}}}(api_client) + {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} -try: -{{#summary}} # {{{.}}} -{{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} - pprint(api_response){{/returnType}} -except ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + try: + {{#summary}} # {{{.}}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} + pprint(api_response){{/returnType}} + except ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) + {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} ``` ## Documentation for API Endpoints diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/README_common.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/README_common.mustache index 5fffdc74fc69..b474eb264ae1 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/README_common.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/README_common.mustache @@ -7,18 +7,20 @@ from pprint import pprint {{> python_doc_auth_partial}} # Defining host is optional and default to {{{basePath}}} configuration.host = "{{{basePath}}}" -# Create an instance of the API class -api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) -{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/allParams}} +# 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 = {{{packageName}}}.{{{classname}}}(api_client) + {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} -try: -{{#summary}} # {{{.}}} -{{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} - pprint(api_response){{/returnType}} -except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + try: + {{#summary}} # {{{.}}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} + pprint(api_response){{/returnType}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) + {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} ``` ## Documentation for API Endpoints diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache index 952089612037..78f502b00db2 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache @@ -3,6 +3,7 @@ from __future__ import absolute_import import json +import atexit import mimetypes from multiprocessing.pool import ThreadPool import os @@ -74,11 +75,19 @@ class ApiClient(object): # Set default User-Agent. self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' - def __del__(self): + 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): @@ -86,6 +95,7 @@ class ApiClient(object): 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 diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache index 8a6beabd2d73..565d00a3b9e9 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache @@ -7,51 +7,55 @@ from pprint import pprint {{#hasAuthMethods}} # Defining host is optional and default to {{{basePath}}} configuration.host = "{{{basePath}}}" -# Create an instance of the API class -api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) +# 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 = {{{packageName}}}.{{{classname}}}(api_client) {{/hasAuthMethods}} {{^hasAuthMethods}} -# Create an instance of the API class -api_instance = {{{packageName}}}.{{{classname}}}() +# 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 = {{{packageName}}}.{{{classname}}}(api_client) {{/hasAuthMethods}} -{{#requiredParams}}{{^defaultValue}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}} -{{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} -{{/optionalParams}} -{{#requiredParams}} -{{^hasMore}} + {{#requiredParams}}{{^defaultValue}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}} + {{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} + {{/optionalParams}} + {{#requiredParams}} + {{^hasMore}} -# example passing only required values which don't have defaults set -try: -{{#summary}} # {{{.}}} -{{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/defaultValue}}{{/requiredParams}}){{#returnType}} - pprint(api_response){{/returnType}} -except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/hasMore}} -{{/requiredParams}} -{{#optionalParams}} -{{^hasMore}} + # example passing only required values which don't have defaults set + try: + {{#summary}} # {{{.}}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/defaultValue}}{{/requiredParams}}){{#returnType}} + pprint(api_response){{/returnType}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) + {{/hasMore}} + {{/requiredParams}} + {{#optionalParams}} + {{^hasMore}} -# example passing only required values which don't have defaults set -# and optional values -try: -{{#summary}} # {{{.}}} -{{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}}={{paramName}}{{#hasMore}}, {{/hasMore}}{{/optionalParams}}){{#returnType}} - pprint(api_response){{/returnType}} -except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/hasMore}} -{{/optionalParams}} -{{^requiredParams}} -{{^optionalParams}} + # example passing only required values which don't have defaults set + # and optional values + try: + {{#summary}} # {{{.}}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}}={{paramName}}{{#hasMore}}, {{/hasMore}}{{/optionalParams}}){{#returnType}} + pprint(api_response){{/returnType}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) + {{/hasMore}} + {{/optionalParams}} + {{^requiredParams}} + {{^optionalParams}} -# example, this endpoint has no required or optional parameters -try: -{{#summary}} # {{{.}}} -{{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}(){{#returnType}} - pprint(api_response){{/returnType}} -except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/optionalParams}} -{{/requiredParams}} + # example, this endpoint has no required or optional parameters + try: + {{#summary}} # {{{.}}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}(){{#returnType}} + pprint(api_response){{/returnType}} + except {{{packageName}}}.ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) + {{/optionalParams}} + {{/requiredParams}} ``` diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index 45618f2a0860..36c0a082f3fd 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -54,17 +54,19 @@ from pprint import pprint # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) - +# 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 = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) + ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md index 3be4009a7d14..f777f0d43e6c 100644 --- a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md @@ -23,16 +23,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() -body = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index c311c9eaf280..9ea1aa2a6b18 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -36,15 +36,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body - -try: - # creates an XmlItem - api_instance.create_xml_item(xml_item) -except ApiException as e: - print("Exception when calling FakeApi->create_xml_item: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body + + try: + # creates an XmlItem + api_instance.create_xml_item(xml_item) + except ApiException as e: + print("Exception when calling FakeApi->create_xml_item: %s\n" % e) ``` ### Parameters @@ -89,15 +91,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = True # bool | Input boolean as post body (optional) - -try: - api_response = api_instance.fake_outer_boolean_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = True # bool | Input boolean as post body (optional) + + try: + api_response = api_instance.fake_outer_boolean_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) ``` ### Parameters @@ -142,15 +146,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) - -try: - api_response = api_instance.fake_outer_composite_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) + + try: + api_response = api_instance.fake_outer_composite_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) ``` ### Parameters @@ -195,15 +201,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 3.4 # float | Input number as post body (optional) - -try: - api_response = api_instance.fake_outer_number_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 3.4 # float | Input number as post body (optional) + + try: + api_response = api_instance.fake_outer_number_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) ``` ### Parameters @@ -248,15 +256,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 'body_example' # str | Input string as post body (optional) - -try: - api_response = api_instance.fake_outer_string_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 'body_example' # str | Input string as post body (optional) + + try: + api_response = api_instance.fake_outer_string_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) ``` ### Parameters @@ -301,14 +311,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | -try: - api_instance.test_body_with_file_schema(body) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) + try: + api_instance.test_body_with_file_schema(body) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) ``` ### Parameters @@ -351,15 +363,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -query = 'query_example' # str | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + query = 'query_example' # str | body = petstore_api.User() # User | -try: - api_instance.test_body_with_query_params(query, body) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) + try: + api_instance.test_body_with_query_params(query, body) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) ``` ### Parameters @@ -405,16 +419,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.Client() # Client | client model - -try: - # To test \"client\" model - api_response = api_instance.test_client_model(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->test_client_model: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test \"client\" model + api_response = api_instance.test_client_model(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->test_client_model: %s\n" % e) ``` ### Parameters @@ -466,9 +482,11 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -number = 3.4 # float | None +# 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 = petstore_api.FakeApi(api_client) + number = 3.4 # float | None double = 3.4 # float | None pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None byte = 'byte_example' # str | None @@ -483,11 +501,11 @@ date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -except ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + except ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` ### Parameters @@ -546,9 +564,11 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to '-efg') @@ -557,11 +577,11 @@ enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$') enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg') -try: - # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) -except ApiException as e: - print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) + try: + # To test enum parameters + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + except ApiException as e: + print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` ### Parameters @@ -614,20 +634,22 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -required_string_group = 56 # int | Required String in group parameters +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters required_int64_group = 56 # int | Required Integer in group parameters string_group = 56 # int | String in group parameters (optional) boolean_group = True # bool | Boolean in group parameters (optional) int64_group = 56 # int | Integer in group parameters (optional) -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) -except ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) ``` ### Parameters @@ -675,15 +697,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = {'key': 'param_example'} # dict(str, str) | request body - -try: - # test inline additionalProperties - api_instance.test_inline_additional_properties(param) -except ApiException as e: - print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = {'key': 'param_example'} # dict(str, str) | request body + + try: + # test inline additionalProperties + api_instance.test_inline_additional_properties(param) + except ApiException as e: + print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) ``` ### Parameters @@ -726,16 +750,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = 'param_example' # str | field1 +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 -try: - # test json serialization of form data - api_instance.test_json_form_data(param, param2) -except ApiException as e: - print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) + try: + # test json serialization of form data + api_instance.test_json_form_data(param, param2) + except ApiException as e: + print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) ``` ### Parameters @@ -781,18 +807,20 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -pipe = ['pipe_example'] # list[str] | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + pipe = ['pipe_example'] # list[str] | ioutil = ['ioutil_example'] # list[str] | http = ['http_example'] # list[str] | url = ['url_example'] # list[str] | context = ['context_example'] # list[str] | -try: - api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) -except ApiException as e: - print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) + try: + api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) + except ApiException as e: + print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md index 2fae5e0c7766..3ea79928f2ac 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md @@ -31,16 +31,18 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # Client | client model - -try: - # To test class name in snake case - api_response = api_instance.test_classname(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) +# 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 = petstore_api.FakeClassnameTags123Api(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test class name in snake case + api_response = api_instance.test_classname(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index e4df08ee37aa..45129d6d620e 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -35,15 +35,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Add a new pet to the store - api_instance.add_pet(body) -except ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Add a new pet to the store + api_instance.add_pet(body) + except ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) ``` ### Parameters @@ -93,16 +95,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | Pet id to delete +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) -try: - # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key) -except ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) + try: + # Deletes a pet + api_instance.delete_pet(pet_id, api_key=api_key) + except ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` ### Parameters @@ -155,16 +159,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # list[str] | Status values that need to be considered for filter - -try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status(status) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + status = ['status_example'] # list[str] | Status values that need to be considered for filter + + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status(status) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` ### Parameters @@ -216,16 +222,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # list[str] | Tags to filter by - -try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + tags = ['tags_example'] # list[str] | Tags to filter by + + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags(tags) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` ### Parameters @@ -279,16 +287,18 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to return - -try: - # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to return + + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id(pet_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` ### Parameters @@ -339,15 +349,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Update an existing pet - api_instance.update_pet(body) -except ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Update an existing pet + api_instance.update_pet(body) + except ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) ``` ### Parameters @@ -399,17 +411,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet that needs to be updated +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) status = 'status_example' # str | Updated status of the pet (optional) -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status) -except ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id, name=name, status=status) + except ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters @@ -460,18 +474,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) file = '/path/to/file' # file | file to upload (optional) -try: - # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) + try: + # uploads an image + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) ``` ### Parameters @@ -522,18 +538,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md index a2f4ece3e3ff..285953422d22 100644 --- a/samples/client/petstore/python-asyncio/docs/StoreApi.md +++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md @@ -26,15 +26,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 'order_id_example' # str | ID of the order that needs to be deleted - -try: - # Delete purchase order by ID - api_instance.delete_order(order_id) -except ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 'order_id_example' # str | ID of the order that needs to be deleted + + try: + # Delete purchase order by ID + api_instance.delete_order(order_id) + except ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` ### Parameters @@ -88,15 +90,17 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) - -try: - # Returns pet inventories by status - api_response = api_instance.get_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_inventory: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + + try: + # Returns pet inventories by status + api_response = api_instance.get_inventory() + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_inventory: %s\n" % e) ``` ### Parameters @@ -138,16 +142,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 56 # int | ID of pet that needs to be fetched - -try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 56 # int | ID of pet that needs to be fetched + + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id(order_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` ### Parameters @@ -192,16 +198,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -body = petstore_api.Order() # Order | order placed for purchasing the pet - -try: - # Place an order for a pet - api_response = api_instance.place_order(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + body = petstore_api.Order() # Order | order placed for purchasing the pet + + try: + # Place an order for a pet + api_response = api_instance.place_order(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-asyncio/docs/UserApi.md b/samples/client/petstore/python-asyncio/docs/UserApi.md index 3ea4a2ef605e..1d69ee7aa6e3 100644 --- a/samples/client/petstore/python-asyncio/docs/UserApi.md +++ b/samples/client/petstore/python-asyncio/docs/UserApi.md @@ -30,15 +30,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = petstore_api.User() # User | Created user object - -try: - # Create user - api_instance.create_user(body) -except ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = petstore_api.User() # User | Created user object + + try: + # Create user + api_instance.create_user(body) + except ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) ``` ### Parameters @@ -81,15 +83,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_array_input(body) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_array_input(body) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` ### Parameters @@ -132,15 +136,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_list_input(body) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_list_input(body) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` ### Parameters @@ -185,15 +191,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be deleted - -try: - # Delete user - api_instance.delete_user(username) -except ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be deleted + + try: + # Delete user + api_instance.delete_user(username) + except ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) ``` ### Parameters @@ -237,16 +245,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. - -try: - # Get user by user name - api_response = api_instance.get_user_by_name(username) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. + + try: + # Get user by user name + api_response = api_instance.get_user_by_name(username) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` ### Parameters @@ -291,17 +301,19 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The user name for login +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text -try: - # Logs user into the system - api_response = api_instance.login_user(username, password) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) + try: + # Logs user into the system + api_response = api_instance.login_user(username, password) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) ``` ### Parameters @@ -346,14 +358,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() - -try: - # Logs out current logged in user session - api_instance.logout_user() -except ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + + try: + # Logs out current logged in user session + api_instance.logout_user() + except ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) ``` ### Parameters @@ -395,16 +409,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | name that need to be deleted +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | name that need to be deleted body = petstore_api.User() # User | Updated user object -try: - # Updated user - api_instance.update_user(username, body) -except ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) + try: + # Updated user + api_instance.update_user(username, body) + except ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index c5cdf86f9a5b..7b8cb7dc239a 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -10,6 +10,7 @@ from __future__ import absolute_import +import atexit import datetime from dateutil.parser import parse import json @@ -80,11 +81,19 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.user_agent = 'OpenAPI-Generator/1.0.0/python' self.client_side_validation = configuration.client_side_validation - def __del__(self): + 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): @@ -92,6 +101,7 @@ def pool(self): 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 diff --git a/samples/client/petstore/python-experimental/README.md b/samples/client/petstore/python-experimental/README.md index 03fc1cca792a..f64e70f79da3 100644 --- a/samples/client/petstore/python-experimental/README.md +++ b/samples/client/petstore/python-experimental/README.md @@ -53,17 +53,19 @@ from pprint import pprint # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # client.Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) - +# 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 = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # client.Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + 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 diff --git a/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md index 75406ffa107c..cd0e35819a19 100644 --- a/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -22,17 +22,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() -body = petstore_api.Client() # client.Client | client model - -# example passing only required values which don't have defaults set -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +# 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 = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # client.Client | client model + + # example passing only required values which don't have defaults set + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-experimental/docs/FakeApi.md b/samples/client/petstore/python-experimental/docs/FakeApi.md index 50e291f02612..bbe8aaccecdf 100644 --- a/samples/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/client/petstore/python-experimental/docs/FakeApi.md @@ -36,16 +36,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -xml_item = petstore_api.XmlItem() # xml_item.XmlItem | XmlItem Body - -# example passing only required values which don't have defaults set -try: - # creates an XmlItem - api_instance.create_xml_item(xml_item) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->create_xml_item: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + xml_item = petstore_api.XmlItem() # xml_item.XmlItem | XmlItem Body + + # example passing only required values which don't have defaults set + try: + # creates an XmlItem + api_instance.create_xml_item(xml_item) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->create_xml_item: %s\n" % e) ``` ### Parameters @@ -89,17 +91,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = True # bool | Input boolean as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_boolean_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = True # bool | Input boolean as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_boolean_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) ``` ### Parameters @@ -143,17 +147,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_composite_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_composite_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) ``` ### Parameters @@ -197,17 +203,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.OuterEnum("placed") # outer_enum.OuterEnum | Input enum as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_enum_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_enum_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = petstore_api.OuterEnum("placed") # outer_enum.OuterEnum | Input enum as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_enum_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_enum_serialize: %s\n" % e) ``` ### Parameters @@ -251,17 +259,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.OuterNumber(3.4) # outer_number.OuterNumber | Input number as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_number_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = petstore_api.OuterNumber(3.4) # outer_number.OuterNumber | Input number as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_number_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) ``` ### Parameters @@ -305,17 +315,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 'body_example' # str | Input string as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_string_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = 'body_example' # str | Input string as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_string_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) ``` ### Parameters @@ -359,15 +371,17 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | - -# example passing only required values which don't have defaults set -try: - api_instance.test_body_with_file_schema(body) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | + + # example passing only required values which don't have defaults set + try: + api_instance.test_body_with_file_schema(body) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) ``` ### Parameters @@ -409,16 +423,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -query = 'query_example' # str | -body = petstore_api.User() # user.User | - -# example passing only required values which don't have defaults set -try: - api_instance.test_body_with_query_params(query, body) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + query = 'query_example' # str | + body = petstore_api.User() # user.User | + + # example passing only required values which don't have defaults set + try: + api_instance.test_body_with_query_params(query, body) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) ``` ### Parameters @@ -463,17 +479,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.Client() # client.Client | client model - -# example passing only required values which don't have defaults set -try: - # To test \"client\" model - api_response = api_instance.test_client_model(body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_client_model: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = petstore_api.Client() # client.Client | client model + + # example passing only required values which don't have defaults set + try: + # To test \"client\" model + api_response = api_instance.test_client_model(body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_client_model: %s\n" % e) ``` ### Parameters @@ -517,14 +535,16 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() - -# example passing only required values which don't have defaults set -try: - api_instance.test_endpoint_enums_length_one() -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_endpoint_enums_length_one: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + + # example passing only required values which don't have defaults set + try: + api_instance.test_endpoint_enums_length_one() + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_endpoint_enums_length_one: %s\n" % e) ``` ### Parameters @@ -579,13 +599,15 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -number = 3.4 # float | None -double = 3.4 # float | None -pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None -byte = 'byte_example' # str | None -integer = 56 # int | None (optional) +# 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 = petstore_api.FakeApi(api_client) + number = 3.4 # float | None + double = 3.4 # float | None + pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None + byte = 'byte_example' # str | None + integer = 56 # int | None (optional) int32 = 56 # int | None (optional) int64 = 56 # int | None (optional) float = 3.4 # float | None (optional) @@ -596,20 +618,20 @@ date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) -# example passing only required values which don't have defaults set -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` ### Parameters @@ -667,9 +689,11 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) +# 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 = petstore_api.FakeApi(api_client) + enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) if omitted the server will use the default value of '-efg' enum_query_string_array = ['enum_query_string_array_example'] # [str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of '-efg' @@ -678,13 +702,13 @@ enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) enum_form_string_array = '$' # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of '$' enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of '-efg' -# example passing only required values which don't have defaults set -# and optional values -try: - # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) + # example passing only required values which don't have defaults set + # and optional values + try: + # To test enum parameters + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` ### Parameters @@ -736,29 +760,31 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -required_string_group = 56 # int | Required String in group parameters -required_boolean_group = True # bool | Required Boolean in group parameters -required_int64_group = 56 # int | Required Integer in group parameters -string_group = 56 # int | String in group parameters (optional) +# 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 = petstore_api.FakeApi(api_client) + required_string_group = 56 # int | Required String in group parameters + required_boolean_group = True # bool | Required Boolean in group parameters + required_int64_group = 56 # int | Required Integer in group parameters + string_group = 56 # int | String in group parameters (optional) boolean_group = True # bool | Boolean in group parameters (optional) int64_group = 56 # int | Integer in group parameters (optional) -# example passing only required values which don't have defaults set -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) ``` ### Parameters @@ -805,16 +831,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = {'key': 'param_example'} # {str: (str,)} | request body - -# example passing only required values which don't have defaults set -try: - # test inline additionalProperties - api_instance.test_inline_additional_properties(param) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + param = {'key': 'param_example'} # {str: (str,)} | request body + + # example passing only required values which don't have defaults set + try: + # test inline additionalProperties + api_instance.test_inline_additional_properties(param) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) ``` ### Parameters @@ -856,17 +884,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = 'param_example' # str | field1 -param2 = 'param2_example' # str | field2 - -# example passing only required values which don't have defaults set -try: - # test json serialization of form data - api_instance.test_json_form_data(param, param2) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + param = 'param_example' # str | field1 + param2 = 'param2_example' # str | field2 + + # example passing only required values which don't have defaults set + try: + # test json serialization of form data + api_instance.test_json_form_data(param, param2) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index 2335c666fd81..658e9ca6220f 100644 --- a/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -30,17 +30,19 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # client.Client | client model - -# example passing only required values which don't have defaults set -try: - # To test class name in snake case - api_response = api_instance.test_classname(body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) +# 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 = petstore_api.FakeClassnameTags123Api(api_client) + body = petstore_api.Client() # client.Client | client model + + # example passing only required values which don't have defaults set + try: + # To test class name in snake case + api_response = api_instance.test_classname(body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-experimental/docs/PetApi.md b/samples/client/petstore/python-experimental/docs/PetApi.md index dbeb8dfe5ac8..8ff3853e3959 100644 --- a/samples/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/client/petstore/python-experimental/docs/PetApi.md @@ -34,16 +34,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store - -# example passing only required values which don't have defaults set -try: - # Add a new pet to the store - api_instance.add_pet(body) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store + + # example passing only required values which don't have defaults set + try: + # Add a new pet to the store + api_instance.add_pet(body) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) ``` ### Parameters @@ -92,25 +94,27 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | Pet id to delete -api_key = 'api_key_example' # str | (optional) - -# example passing only required values which don't have defaults set -try: - # Deletes a pet - api_instance.delete_pet(pet_id) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | Pet id to delete + api_key = 'api_key_example' # str | (optional) + + # example passing only required values which don't have defaults set + try: + # Deletes a pet + api_instance.delete_pet(pet_id) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Deletes a pet + api_instance.delete_pet(pet_id, api_key=api_key) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` ### Parameters @@ -162,17 +166,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # [str] | Status values that need to be considered for filter - -# example passing only required values which don't have defaults set -try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status(status) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + status = ['status_example'] # [str] | Status values that need to be considered for filter + + # example passing only required values which don't have defaults set + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status(status) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` ### Parameters @@ -223,17 +229,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # [str] | Tags to filter by - -# example passing only required values which don't have defaults set -try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + tags = ['tags_example'] # [str] | Tags to filter by + + # example passing only required values which don't have defaults set + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags(tags) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` ### Parameters @@ -286,17 +294,19 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to return - -# example passing only required values which don't have defaults set -try: - # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to return + + # example passing only required values which don't have defaults set + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id(pet_id) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` ### Parameters @@ -346,16 +356,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store - -# example passing only required values which don't have defaults set -try: - # Update an existing pet - api_instance.update_pet(body) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store + + # example passing only required values which don't have defaults set + try: + # Update an existing pet + api_instance.update_pet(body) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) ``` ### Parameters @@ -406,26 +418,28 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet that needs to be updated -name = 'name_example' # str | Updated name of the pet (optional) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet that needs to be updated + name = 'name_example' # str | Updated name of the pet (optional) status = 'status_example' # str | Updated status of the pet (optional) -# example passing only required values which don't have defaults set -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id, name=name, status=status) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters @@ -475,29 +489,31 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update + additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) file = open('/path/to/file', 'rb') # file_type | file to upload (optional) files = open('/path/to/file', 'rb') # [file_type] | files to upload (optional) -# example passing only required values which don't have defaults set -try: - # uploads an image - api_response = api_instance.upload_file(pet_id) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file, files=files) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # uploads an image + api_response = api_instance.upload_file(pet_id) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # uploads an image + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file, files=files) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) ``` ### Parameters @@ -548,28 +564,30 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -required_file = open('/path/to/file', 'rb') # file_type | file to upload -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) - -# example passing only required values which don't have defaults set -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file) - 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 required values which don't have defaults set -# and optional values -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update + required_file = open('/path/to/file', 'rb') # file_type | file to upload + additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + + # example passing only required values which don't have defaults set + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file) + 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 required values which don't have defaults set + # and optional values + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-experimental/docs/StoreApi.md b/samples/client/petstore/python-experimental/docs/StoreApi.md index 6dfdac72b496..ed8692abf57a 100644 --- a/samples/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/client/petstore/python-experimental/docs/StoreApi.md @@ -25,16 +25,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 'order_id_example' # str | ID of the order that needs to be deleted - -# example passing only required values which don't have defaults set -try: - # Delete purchase order by ID - api_instance.delete_order(order_id) -except petstore_api.ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + order_id = 'order_id_example' # str | ID of the order that needs to be deleted + + # example passing only required values which don't have defaults set + try: + # Delete purchase order by ID + api_instance.delete_order(order_id) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` ### Parameters @@ -87,16 +89,18 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) - -# 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) +# 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 = petstore_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 @@ -137,17 +141,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 56 # int | ID of pet that needs to be fetched - -# example passing only required values which don't have defaults set -try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + order_id = 56 # int | ID of pet that needs to be fetched + + # example passing only required values which don't have defaults set + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id(order_id) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` ### Parameters @@ -191,17 +197,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -body = petstore_api.Order() # order.Order | order placed for purchasing the pet - -# example passing only required values which don't have defaults set -try: - # Place an order for a pet - api_response = api_instance.place_order(body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + body = petstore_api.Order() # order.Order | order placed for purchasing the pet + + # example passing only required values which don't have defaults set + try: + # Place an order for a pet + api_response = api_instance.place_order(body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-experimental/docs/UserApi.md b/samples/client/petstore/python-experimental/docs/UserApi.md index d93a4059c3b3..318a1b5827dd 100644 --- a/samples/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/client/petstore/python-experimental/docs/UserApi.md @@ -29,16 +29,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = petstore_api.User() # user.User | Created user object - -# example passing only required values which don't have defaults set -try: - # Create user - api_instance.create_user(body) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + body = petstore_api.User() # user.User | Created user object + + # example passing only required values which don't have defaults set + try: + # Create user + api_instance.create_user(body) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) ``` ### Parameters @@ -80,16 +82,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # [user.User] | List of user object - -# example passing only required values which don't have defaults set -try: - # Creates list of users with given input array - api_instance.create_users_with_array_input(body) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # [user.User] | List of user object + + # example passing only required values which don't have defaults set + try: + # Creates list of users with given input array + api_instance.create_users_with_array_input(body) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` ### Parameters @@ -131,16 +135,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # [user.User] | List of user object - -# example passing only required values which don't have defaults set -try: - # Creates list of users with given input array - api_instance.create_users_with_list_input(body) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # [user.User] | List of user object + + # example passing only required values which don't have defaults set + try: + # Creates list of users with given input array + api_instance.create_users_with_list_input(body) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` ### Parameters @@ -184,16 +190,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be deleted - -# example passing only required values which don't have defaults set -try: - # Delete user - api_instance.delete_user(username) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be deleted + + # example passing only required values which don't have defaults set + try: + # Delete user + api_instance.delete_user(username) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) ``` ### Parameters @@ -236,17 +244,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. - -# example passing only required values which don't have defaults set -try: - # Get user by user name - api_response = api_instance.get_user_by_name(username) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. + + # example passing only required values which don't have defaults set + try: + # Get user by user name + api_response = api_instance.get_user_by_name(username) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` ### Parameters @@ -290,18 +300,20 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The user name for login -password = 'password_example' # str | The password for login in clear text - -# example passing only required values which don't have defaults set -try: - # Logs user into the system - api_response = api_instance.login_user(username, password) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | The user name for login + password = 'password_example' # str | The password for login in clear text + + # example passing only required values which don't have defaults set + try: + # Logs user into the system + api_response = api_instance.login_user(username, password) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) ``` ### Parameters @@ -345,15 +357,17 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() - -# example, this endpoint has no required or optional parameters -try: - # Logs out current logged in user session - api_instance.logout_user() -except petstore_api.ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Logs out current logged in user session + api_instance.logout_user() + except petstore_api.ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) ``` ### Parameters @@ -394,17 +408,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | name that need to be deleted -body = petstore_api.User() # user.User | Updated user object - -# example passing only required values which don't have defaults set -try: - # Updated user - api_instance.update_user(username, body) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | name that need to be deleted + body = petstore_api.User() # user.User | Updated user object + + # example passing only required values which don't have defaults set + try: + # Updated user + api_instance.update_user(username, body) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-experimental/petstore_api/api_client.py b/samples/client/petstore/python-experimental/petstore_api/api_client.py index 1ebbe8969740..2030094e2c39 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api_client.py +++ b/samples/client/petstore/python-experimental/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import json +import atexit import mimetypes from multiprocessing.pool import ThreadPool import os @@ -79,11 +80,19 @@ def __init__(self, configuration=None, header_name=None, header_value=None, # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' - def __del__(self): + 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): @@ -91,6 +100,7 @@ def pool(self): 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 diff --git a/samples/client/petstore/python-experimental/tests/test_api_client.py b/samples/client/petstore/python-experimental/tests/test_api_client.py index fdf7e05d8385..f36762e84e8e 100644 --- a/samples/client/petstore/python-experimental/tests/test_api_client.py +++ b/samples/client/petstore/python-experimental/tests/test_api_client.py @@ -11,6 +11,8 @@ import os import time +import atexit +import weakref import unittest from dateutil.parser import parse @@ -199,3 +201,17 @@ def test_sanitize_for_serialization(self): model = petstore_api.StringBooleanMap(**model_dict) result = self.api_client.sanitize_for_serialization(model) self.assertEqual(result, model_dict) + + def test_context_manager_closes_threadpool(self): + with petstore_api.ApiClient() as client: + self.assertIsNotNone(client.pool) + pool_ref = weakref.ref(client._pool) + self.assertIsNotNone(pool_ref()) + self.assertIsNone(pool_ref()) + + def test_atexit_closes_threadpool(self): + client = petstore_api.ApiClient() + self.assertIsNotNone(client.pool) + self.assertIsNotNone(client._pool) + atexit._run_exitfuncs() + self.assertIsNone(client._pool) diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index 45618f2a0860..36c0a082f3fd 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -54,17 +54,19 @@ from pprint import pprint # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) - +# 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 = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) + ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md index 3be4009a7d14..f777f0d43e6c 100644 --- a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md @@ -23,16 +23,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() -body = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index c311c9eaf280..9ea1aa2a6b18 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -36,15 +36,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body - -try: - # creates an XmlItem - api_instance.create_xml_item(xml_item) -except ApiException as e: - print("Exception when calling FakeApi->create_xml_item: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body + + try: + # creates an XmlItem + api_instance.create_xml_item(xml_item) + except ApiException as e: + print("Exception when calling FakeApi->create_xml_item: %s\n" % e) ``` ### Parameters @@ -89,15 +91,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = True # bool | Input boolean as post body (optional) - -try: - api_response = api_instance.fake_outer_boolean_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = True # bool | Input boolean as post body (optional) + + try: + api_response = api_instance.fake_outer_boolean_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) ``` ### Parameters @@ -142,15 +146,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) - -try: - api_response = api_instance.fake_outer_composite_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) + + try: + api_response = api_instance.fake_outer_composite_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) ``` ### Parameters @@ -195,15 +201,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 3.4 # float | Input number as post body (optional) - -try: - api_response = api_instance.fake_outer_number_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 3.4 # float | Input number as post body (optional) + + try: + api_response = api_instance.fake_outer_number_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) ``` ### Parameters @@ -248,15 +256,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 'body_example' # str | Input string as post body (optional) - -try: - api_response = api_instance.fake_outer_string_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 'body_example' # str | Input string as post body (optional) + + try: + api_response = api_instance.fake_outer_string_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) ``` ### Parameters @@ -301,14 +311,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | -try: - api_instance.test_body_with_file_schema(body) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) + try: + api_instance.test_body_with_file_schema(body) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) ``` ### Parameters @@ -351,15 +363,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -query = 'query_example' # str | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + query = 'query_example' # str | body = petstore_api.User() # User | -try: - api_instance.test_body_with_query_params(query, body) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) + try: + api_instance.test_body_with_query_params(query, body) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) ``` ### Parameters @@ -405,16 +419,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.Client() # Client | client model - -try: - # To test \"client\" model - api_response = api_instance.test_client_model(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->test_client_model: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test \"client\" model + api_response = api_instance.test_client_model(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->test_client_model: %s\n" % e) ``` ### Parameters @@ -466,9 +482,11 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -number = 3.4 # float | None +# 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 = petstore_api.FakeApi(api_client) + number = 3.4 # float | None double = 3.4 # float | None pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None byte = 'byte_example' # str | None @@ -483,11 +501,11 @@ date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -except ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + except ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` ### Parameters @@ -546,9 +564,11 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to '-efg') @@ -557,11 +577,11 @@ enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$') enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg') -try: - # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) -except ApiException as e: - print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) + try: + # To test enum parameters + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + except ApiException as e: + print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` ### Parameters @@ -614,20 +634,22 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -required_string_group = 56 # int | Required String in group parameters +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters required_int64_group = 56 # int | Required Integer in group parameters string_group = 56 # int | String in group parameters (optional) boolean_group = True # bool | Boolean in group parameters (optional) int64_group = 56 # int | Integer in group parameters (optional) -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) -except ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) ``` ### Parameters @@ -675,15 +697,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = {'key': 'param_example'} # dict(str, str) | request body - -try: - # test inline additionalProperties - api_instance.test_inline_additional_properties(param) -except ApiException as e: - print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = {'key': 'param_example'} # dict(str, str) | request body + + try: + # test inline additionalProperties + api_instance.test_inline_additional_properties(param) + except ApiException as e: + print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) ``` ### Parameters @@ -726,16 +750,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = 'param_example' # str | field1 +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 -try: - # test json serialization of form data - api_instance.test_json_form_data(param, param2) -except ApiException as e: - print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) + try: + # test json serialization of form data + api_instance.test_json_form_data(param, param2) + except ApiException as e: + print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) ``` ### Parameters @@ -781,18 +807,20 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -pipe = ['pipe_example'] # list[str] | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + pipe = ['pipe_example'] # list[str] | ioutil = ['ioutil_example'] # list[str] | http = ['http_example'] # list[str] | url = ['url_example'] # list[str] | context = ['context_example'] # list[str] | -try: - api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) -except ApiException as e: - print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) + try: + api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) + except ApiException as e: + print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md index 2fae5e0c7766..3ea79928f2ac 100644 --- a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md @@ -31,16 +31,18 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # Client | client model - -try: - # To test class name in snake case - api_response = api_instance.test_classname(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) +# 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 = petstore_api.FakeClassnameTags123Api(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test class name in snake case + api_response = api_instance.test_classname(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index e4df08ee37aa..45129d6d620e 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -35,15 +35,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Add a new pet to the store - api_instance.add_pet(body) -except ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Add a new pet to the store + api_instance.add_pet(body) + except ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) ``` ### Parameters @@ -93,16 +95,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | Pet id to delete +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) -try: - # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key) -except ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) + try: + # Deletes a pet + api_instance.delete_pet(pet_id, api_key=api_key) + except ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` ### Parameters @@ -155,16 +159,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # list[str] | Status values that need to be considered for filter - -try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status(status) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + status = ['status_example'] # list[str] | Status values that need to be considered for filter + + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status(status) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` ### Parameters @@ -216,16 +222,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # list[str] | Tags to filter by - -try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + tags = ['tags_example'] # list[str] | Tags to filter by + + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags(tags) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` ### Parameters @@ -279,16 +287,18 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to return - -try: - # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to return + + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id(pet_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` ### Parameters @@ -339,15 +349,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Update an existing pet - api_instance.update_pet(body) -except ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Update an existing pet + api_instance.update_pet(body) + except ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) ``` ### Parameters @@ -399,17 +411,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet that needs to be updated +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) status = 'status_example' # str | Updated status of the pet (optional) -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status) -except ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id, name=name, status=status) + except ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters @@ -460,18 +474,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) file = '/path/to/file' # file | file to upload (optional) -try: - # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) + try: + # uploads an image + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) ``` ### Parameters @@ -522,18 +538,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md index a2f4ece3e3ff..285953422d22 100644 --- a/samples/client/petstore/python-tornado/docs/StoreApi.md +++ b/samples/client/petstore/python-tornado/docs/StoreApi.md @@ -26,15 +26,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 'order_id_example' # str | ID of the order that needs to be deleted - -try: - # Delete purchase order by ID - api_instance.delete_order(order_id) -except ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 'order_id_example' # str | ID of the order that needs to be deleted + + try: + # Delete purchase order by ID + api_instance.delete_order(order_id) + except ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` ### Parameters @@ -88,15 +90,17 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) - -try: - # Returns pet inventories by status - api_response = api_instance.get_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_inventory: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + + try: + # Returns pet inventories by status + api_response = api_instance.get_inventory() + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_inventory: %s\n" % e) ``` ### Parameters @@ -138,16 +142,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 56 # int | ID of pet that needs to be fetched - -try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 56 # int | ID of pet that needs to be fetched + + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id(order_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` ### Parameters @@ -192,16 +198,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -body = petstore_api.Order() # Order | order placed for purchasing the pet - -try: - # Place an order for a pet - api_response = api_instance.place_order(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + body = petstore_api.Order() # Order | order placed for purchasing the pet + + try: + # Place an order for a pet + api_response = api_instance.place_order(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-tornado/docs/UserApi.md b/samples/client/petstore/python-tornado/docs/UserApi.md index 3ea4a2ef605e..1d69ee7aa6e3 100644 --- a/samples/client/petstore/python-tornado/docs/UserApi.md +++ b/samples/client/petstore/python-tornado/docs/UserApi.md @@ -30,15 +30,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = petstore_api.User() # User | Created user object - -try: - # Create user - api_instance.create_user(body) -except ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = petstore_api.User() # User | Created user object + + try: + # Create user + api_instance.create_user(body) + except ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) ``` ### Parameters @@ -81,15 +83,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_array_input(body) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_array_input(body) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` ### Parameters @@ -132,15 +136,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_list_input(body) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_list_input(body) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` ### Parameters @@ -185,15 +191,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be deleted - -try: - # Delete user - api_instance.delete_user(username) -except ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be deleted + + try: + # Delete user + api_instance.delete_user(username) + except ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) ``` ### Parameters @@ -237,16 +245,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. - -try: - # Get user by user name - api_response = api_instance.get_user_by_name(username) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. + + try: + # Get user by user name + api_response = api_instance.get_user_by_name(username) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` ### Parameters @@ -291,17 +301,19 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The user name for login +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text -try: - # Logs user into the system - api_response = api_instance.login_user(username, password) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) + try: + # Logs user into the system + api_response = api_instance.login_user(username, password) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) ``` ### Parameters @@ -346,14 +358,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() - -try: - # Logs out current logged in user session - api_instance.logout_user() -except ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + + try: + # Logs out current logged in user session + api_instance.logout_user() + except ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) ``` ### Parameters @@ -395,16 +409,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | name that need to be deleted +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | name that need to be deleted body = petstore_api.User() # User | Updated user object -try: - # Updated user - api_instance.update_user(username, body) -except ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) + try: + # Updated user + api_instance.update_user(username, body) + except ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 0ccd640f01b4..dde7bac90f47 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -10,6 +10,7 @@ from __future__ import absolute_import +import atexit import datetime from dateutil.parser import parse import json @@ -81,11 +82,19 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.user_agent = 'OpenAPI-Generator/1.0.0/python' self.client_side_validation = configuration.client_side_validation - def __del__(self): + 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): @@ -93,6 +102,7 @@ def pool(self): 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 diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 45618f2a0860..36c0a082f3fd 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -54,17 +54,19 @@ from pprint import pprint # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) - +# 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 = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) + ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/python/docs/AnotherFakeApi.md b/samples/client/petstore/python/docs/AnotherFakeApi.md index 3be4009a7d14..f777f0d43e6c 100644 --- a/samples/client/petstore/python/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python/docs/AnotherFakeApi.md @@ -23,16 +23,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() -body = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.AnotherFakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index c311c9eaf280..9ea1aa2a6b18 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -36,15 +36,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body - -try: - # creates an XmlItem - api_instance.create_xml_item(xml_item) -except ApiException as e: - print("Exception when calling FakeApi->create_xml_item: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body + + try: + # creates an XmlItem + api_instance.create_xml_item(xml_item) + except ApiException as e: + print("Exception when calling FakeApi->create_xml_item: %s\n" % e) ``` ### Parameters @@ -89,15 +91,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = True # bool | Input boolean as post body (optional) - -try: - api_response = api_instance.fake_outer_boolean_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = True # bool | Input boolean as post body (optional) + + try: + api_response = api_instance.fake_outer_boolean_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) ``` ### Parameters @@ -142,15 +146,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) - -try: - api_response = api_instance.fake_outer_composite_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) + + try: + api_response = api_instance.fake_outer_composite_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) ``` ### Parameters @@ -195,15 +201,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 3.4 # float | Input number as post body (optional) - -try: - api_response = api_instance.fake_outer_number_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 3.4 # float | Input number as post body (optional) + + try: + api_response = api_instance.fake_outer_number_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) ``` ### Parameters @@ -248,15 +256,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 'body_example' # str | Input string as post body (optional) - -try: - api_response = api_instance.fake_outer_string_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 'body_example' # str | Input string as post body (optional) + + try: + api_response = api_instance.fake_outer_string_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) ``` ### Parameters @@ -301,14 +311,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | -try: - api_instance.test_body_with_file_schema(body) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) + try: + api_instance.test_body_with_file_schema(body) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) ``` ### Parameters @@ -351,15 +363,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -query = 'query_example' # str | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + query = 'query_example' # str | body = petstore_api.User() # User | -try: - api_instance.test_body_with_query_params(query, body) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) + try: + api_instance.test_body_with_query_params(query, body) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) ``` ### Parameters @@ -405,16 +419,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = petstore_api.Client() # Client | client model - -try: - # To test \"client\" model - api_response = api_instance.test_client_model(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->test_client_model: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test \"client\" model + api_response = api_instance.test_client_model(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->test_client_model: %s\n" % e) ``` ### Parameters @@ -466,9 +482,11 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -number = 3.4 # float | None +# 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 = petstore_api.FakeApi(api_client) + number = 3.4 # float | None double = 3.4 # float | None pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None byte = 'byte_example' # str | None @@ -483,11 +501,11 @@ date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -except ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + except ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` ### Parameters @@ -546,9 +564,11 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to '-efg') @@ -557,11 +577,11 @@ enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$') enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg') -try: - # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) -except ApiException as e: - print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) + try: + # To test enum parameters + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + except ApiException as e: + print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` ### Parameters @@ -614,20 +634,22 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -required_string_group = 56 # int | Required String in group parameters +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters required_int64_group = 56 # int | Required Integer in group parameters string_group = 56 # int | String in group parameters (optional) boolean_group = True # bool | Boolean in group parameters (optional) int64_group = 56 # int | Integer in group parameters (optional) -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) -except ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) ``` ### Parameters @@ -675,15 +697,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = {'key': 'param_example'} # dict(str, str) | request body - -try: - # test inline additionalProperties - api_instance.test_inline_additional_properties(param) -except ApiException as e: - print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = {'key': 'param_example'} # dict(str, str) | request body + + try: + # test inline additionalProperties + api_instance.test_inline_additional_properties(param) + except ApiException as e: + print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) ``` ### Parameters @@ -726,16 +750,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = 'param_example' # str | field1 +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 -try: - # test json serialization of form data - api_instance.test_json_form_data(param, param2) -except ApiException as e: - print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) + try: + # test json serialization of form data + api_instance.test_json_form_data(param, param2) + except ApiException as e: + print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) ``` ### Parameters @@ -781,18 +807,20 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -pipe = ['pipe_example'] # list[str] | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + pipe = ['pipe_example'] # list[str] | ioutil = ['ioutil_example'] # list[str] | http = ['http_example'] # list[str] | url = ['url_example'] # list[str] | context = ['context_example'] # list[str] | -try: - api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) -except ApiException as e: - print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) + try: + api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) + except ApiException as e: + print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md index 2fae5e0c7766..3ea79928f2ac 100644 --- a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -31,16 +31,18 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) -body = petstore_api.Client() # Client | client model - -try: - # To test class name in snake case - api_response = api_instance.test_classname(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) +# 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 = petstore_api.FakeClassnameTags123Api(api_client) + body = petstore_api.Client() # Client | client model + + try: + # To test class name in snake case + api_response = api_instance.test_classname(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index e4df08ee37aa..45129d6d620e 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -35,15 +35,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Add a new pet to the store - api_instance.add_pet(body) -except ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Add a new pet to the store + api_instance.add_pet(body) + except ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) ``` ### Parameters @@ -93,16 +95,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | Pet id to delete +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) -try: - # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key) -except ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) + try: + # Deletes a pet + api_instance.delete_pet(pet_id, api_key=api_key) + except ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` ### Parameters @@ -155,16 +159,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # list[str] | Status values that need to be considered for filter - -try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status(status) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + status = ['status_example'] # list[str] | Status values that need to be considered for filter + + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status(status) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` ### Parameters @@ -216,16 +222,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # list[str] | Tags to filter by - -try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + tags = ['tags_example'] # list[str] | Tags to filter by + + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags(tags) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` ### Parameters @@ -279,16 +287,18 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to return - -try: - # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to return + + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id(pet_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` ### Parameters @@ -339,15 +349,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Update an existing pet - api_instance.update_pet(body) -except ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Update an existing pet + api_instance.update_pet(body) + except ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) ``` ### Parameters @@ -399,17 +411,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet that needs to be updated +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) status = 'status_example' # str | Updated status of the pet (optional) -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status) -except ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id, name=name, status=status) + except ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters @@ -460,18 +474,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) file = '/path/to/file' # file | file to upload (optional) -try: - # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) + try: + # uploads an image + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) ``` ### Parameters @@ -522,18 +538,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md index a2f4ece3e3ff..285953422d22 100644 --- a/samples/client/petstore/python/docs/StoreApi.md +++ b/samples/client/petstore/python/docs/StoreApi.md @@ -26,15 +26,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 'order_id_example' # str | ID of the order that needs to be deleted - -try: - # Delete purchase order by ID - api_instance.delete_order(order_id) -except ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 'order_id_example' # str | ID of the order that needs to be deleted + + try: + # Delete purchase order by ID + api_instance.delete_order(order_id) + except ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` ### Parameters @@ -88,15 +90,17 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) - -try: - # Returns pet inventories by status - api_response = api_instance.get_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_inventory: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + + try: + # Returns pet inventories by status + api_response = api_instance.get_inventory() + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_inventory: %s\n" % e) ``` ### Parameters @@ -138,16 +142,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 56 # int | ID of pet that needs to be fetched - -try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 56 # int | ID of pet that needs to be fetched + + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id(order_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` ### Parameters @@ -192,16 +198,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -body = petstore_api.Order() # Order | order placed for purchasing the pet - -try: - # Place an order for a pet - api_response = api_instance.place_order(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + body = petstore_api.Order() # Order | order placed for purchasing the pet + + try: + # Place an order for a pet + api_response = api_instance.place_order(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python/docs/UserApi.md b/samples/client/petstore/python/docs/UserApi.md index 3ea4a2ef605e..1d69ee7aa6e3 100644 --- a/samples/client/petstore/python/docs/UserApi.md +++ b/samples/client/petstore/python/docs/UserApi.md @@ -30,15 +30,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = petstore_api.User() # User | Created user object - -try: - # Create user - api_instance.create_user(body) -except ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = petstore_api.User() # User | Created user object + + try: + # Create user + api_instance.create_user(body) + except ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) ``` ### Parameters @@ -81,15 +83,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_array_input(body) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_array_input(body) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` ### Parameters @@ -132,15 +136,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -body = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_list_input(body) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + body = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_list_input(body) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` ### Parameters @@ -185,15 +191,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be deleted - -try: - # Delete user - api_instance.delete_user(username) -except ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be deleted + + try: + # Delete user + api_instance.delete_user(username) + except ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) ``` ### Parameters @@ -237,16 +245,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. - -try: - # Get user by user name - api_response = api_instance.get_user_by_name(username) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. + + try: + # Get user by user name + api_response = api_instance.get_user_by_name(username) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` ### Parameters @@ -291,17 +301,19 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The user name for login +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text -try: - # Logs user into the system - api_response = api_instance.login_user(username, password) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) + try: + # Logs user into the system + api_response = api_instance.login_user(username, password) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) ``` ### Parameters @@ -346,14 +358,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() - -try: - # Logs out current logged in user session - api_instance.logout_user() -except ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + + try: + # Logs out current logged in user session + api_instance.logout_user() + except ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) ``` ### Parameters @@ -395,16 +409,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | name that need to be deleted +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | name that need to be deleted body = petstore_api.User() # User | Updated user object -try: - # Updated user - api_instance.update_user(username, body) -except ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) + try: + # Updated user + api_instance.update_user(username, body) + except ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) ``` ### Parameters diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index a18f322840f2..aec97a99e067 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -10,6 +10,7 @@ from __future__ import absolute_import +import atexit import datetime from dateutil.parser import parse import json @@ -80,11 +81,19 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.user_agent = 'OpenAPI-Generator/1.0.0/python' self.client_side_validation = configuration.client_side_validation - def __del__(self): + 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): @@ -92,6 +101,7 @@ def pool(self): 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 diff --git a/samples/client/petstore/python/tests/test_api_client.py b/samples/client/petstore/python/tests/test_api_client.py index c9b9edd86c44..216e1f9ec1b4 100644 --- a/samples/client/petstore/python/tests/test_api_client.py +++ b/samples/client/petstore/python/tests/test_api_client.py @@ -11,6 +11,8 @@ import os import time +import atexit +import weakref import unittest from dateutil.parser import parse @@ -169,3 +171,17 @@ def test_sanitize_for_serialization(self): data = [pet] result = self.api_client.sanitize_for_serialization(data) self.assertEqual(result, list_of_pet_dict) + + def test_context_manager_closes_threadpool(self): + with petstore_api.ApiClient() as client: + self.assertIsNotNone(client.pool) + pool_ref = weakref.ref(client._pool) + self.assertIsNotNone(pool_ref()) + self.assertIsNone(pool_ref()) + + def test_atexit_closes_threadpool(self): + client = petstore_api.ApiClient() + self.assertIsNotNone(client.pool) + self.assertIsNotNone(client._pool) + atexit._run_exitfuncs() + self.assertIsNone(client._pool) diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md index 1f91ec0bcf0d..1fa0ed6f66ee 100644 --- a/samples/openapi3/client/petstore/python-experimental/README.md +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -53,17 +53,19 @@ from pprint import pprint # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) -client_client = petstore_api.Client() # client.Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(client_client) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) - +# 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 = petstore_api.AnotherFakeApi(api_client) + client_client = petstore_api.Client() # client.Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(client_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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md index b9a702534924..4c159f9f10c5 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -22,17 +22,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() -client_client = petstore_api.Client() # client.Client | client model - -# example passing only required values which don't have defaults set -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(client_client) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +# 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 = petstore_api.AnotherFakeApi(api_client) + client_client = petstore_api.Client() # client.Client | client model + + # example passing only required values which don't have defaults set + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(client_client) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md index cf6c28c597cc..17513301ccc8 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md @@ -20,15 +20,17 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.DefaultApi() - -# 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) +# 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 = petstore_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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 63cbd5d18424..3fd53419eb7d 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -33,16 +33,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() - -# 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) +# 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 = petstore_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 @@ -83,17 +85,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = True # bool | Input boolean as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_boolean_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = True # bool | Input boolean as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_boolean_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) ``` ### Parameters @@ -137,17 +141,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -outer_composite_outer_composite = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_composite_serialize(outer_composite_outer_composite=outer_composite_outer_composite) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + outer_composite_outer_composite = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_composite_serialize(outer_composite_outer_composite=outer_composite_outer_composite) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) ``` ### Parameters @@ -191,17 +197,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 3.4 # float | Input number as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_number_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = 3.4 # float | Input number as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_number_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) ``` ### Parameters @@ -245,17 +253,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 'body_example' # str | Input string as post body (optional) - -# example passing only required values which don't have defaults set -# and optional values -try: - api_response = api_instance.fake_outer_string_serialize(body=body) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + body = 'body_example' # str | Input string as post body (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.fake_outer_string_serialize(body=body) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) ``` ### Parameters @@ -299,15 +309,17 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -file_schema_test_class_file_schema_test_class = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | - -# example passing only required values which don't have defaults set -try: - api_instance.test_body_with_file_schema(file_schema_test_class_file_schema_test_class) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + file_schema_test_class_file_schema_test_class = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | + + # example passing only required values which don't have defaults set + try: + api_instance.test_body_with_file_schema(file_schema_test_class_file_schema_test_class) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) ``` ### Parameters @@ -349,16 +361,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -query = 'query_example' # str | -user_user = petstore_api.User() # user.User | - -# example passing only required values which don't have defaults set -try: - api_instance.test_body_with_query_params(query, user_user) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + query = 'query_example' # str | + user_user = petstore_api.User() # user.User | + + # example passing only required values which don't have defaults set + try: + api_instance.test_body_with_query_params(query, user_user) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) ``` ### Parameters @@ -403,17 +417,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -client_client = petstore_api.Client() # client.Client | client model - -# example passing only required values which don't have defaults set -try: - # To test \"client\" model - api_response = api_instance.test_client_model(client_client) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_client_model: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + client_client = petstore_api.Client() # client.Client | client model + + # example passing only required values which don't have defaults set + try: + # To test \"client\" model + api_response = api_instance.test_client_model(client_client) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_client_model: %s\n" % e) ``` ### Parameters @@ -464,13 +480,15 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -number = 3.4 # float | None -double = 3.4 # float | None -pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None -byte = 'byte_example' # str | None -integer = 56 # int | None (optional) +# 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 = petstore_api.FakeApi(api_client) + number = 3.4 # float | None + double = 3.4 # float | None + pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None + byte = 'byte_example' # str | None + integer = 56 # int | None (optional) int32 = 56 # int | None (optional) int64 = 56 # int | None (optional) float = 3.4 # float | None (optional) @@ -481,20 +499,20 @@ date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) -# example passing only required values which don't have defaults set -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` ### Parameters @@ -552,9 +570,11 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) +# 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 = petstore_api.FakeApi(api_client) + enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) if omitted the server will use the default value of '-efg' enum_query_string_array = ['enum_query_string_array_example'] # [str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of '-efg' @@ -563,13 +583,13 @@ enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) enum_form_string_array = '$' # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of '$' enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of '-efg' -# example passing only required values which don't have defaults set -# and optional values -try: - # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) + # example passing only required values which don't have defaults set + # and optional values + try: + # To test enum parameters + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` ### Parameters @@ -627,29 +647,31 @@ configuration.access_token = 'YOUR_BEARER_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -required_string_group = 56 # int | Required String in group parameters -required_boolean_group = True # bool | Required Boolean in group parameters -required_int64_group = 56 # int | Required Integer in group parameters -string_group = 56 # int | String in group parameters (optional) +# 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 = petstore_api.FakeApi(api_client) + required_string_group = 56 # int | Required String in group parameters + required_boolean_group = True # bool | Required Boolean in group parameters + required_int64_group = 56 # int | Required Integer in group parameters + string_group = 56 # int | String in group parameters (optional) boolean_group = True # bool | Boolean in group parameters (optional) int64_group = 56 # int | Integer in group parameters (optional) -# example passing only required values which don't have defaults set -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) ``` ### Parameters @@ -696,16 +718,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -request_body = {'key': 'request_body_example'} # {str: (str,)} | request body - -# example passing only required values which don't have defaults set -try: - # test inline additionalProperties - api_instance.test_inline_additional_properties(request_body) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + request_body = {'key': 'request_body_example'} # {str: (str,)} | request body + + # example passing only required values which don't have defaults set + try: + # test inline additionalProperties + api_instance.test_inline_additional_properties(request_body) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) ``` ### Parameters @@ -747,17 +771,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = 'param_example' # str | field1 -param2 = 'param2_example' # str | field2 - -# example passing only required values which don't have defaults set -try: - # test json serialization of form data - api_instance.test_json_form_data(param, param2) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + param = 'param_example' # str | field1 + param2 = 'param2_example' # str | field2 + + # example passing only required values which don't have defaults set + try: + # test json serialization of form data + api_instance.test_json_form_data(param, param2) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) ``` ### Parameters @@ -802,19 +828,21 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -pipe = ['pipe_example'] # [str] | -ioutil = ['ioutil_example'] # [str] | -http = ['http_example'] # [str] | -url = ['url_example'] # [str] | -context = ['context_example'] # [str] | - -# example passing only required values which don't have defaults set -try: - api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) -except petstore_api.ApiException as e: - print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) +# 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 = petstore_api.FakeApi(api_client) + pipe = ['pipe_example'] # [str] | + ioutil = ['ioutil_example'] # [str] | + http = ['http_example'] # [str] | + url = ['url_example'] # [str] | + context = ['context_example'] # [str] | + + # example passing only required values which don't have defaults set + try: + api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) + except petstore_api.ApiException as e: + print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index 4f78b1bd4cbc..74d3bf84f757 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -30,17 +30,19 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) -client_client = petstore_api.Client() # client.Client | client model - -# example passing only required values which don't have defaults set -try: - # To test class name in snake case - api_response = api_instance.test_classname(client_client) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) +# 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 = petstore_api.FakeClassnameTags123Api(api_client) + client_client = petstore_api.Client() # client.Client | client model + + # example passing only required values which don't have defaults set + try: + # To test class name in snake case + api_response = api_instance.test_classname(client_client) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md index 2a09dc5f86b2..1f8dddead6de 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md @@ -55,16 +55,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_pet = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store - -# example passing only required values which don't have defaults set -try: - # Add a new pet to the store - api_instance.add_pet(pet_pet) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_pet = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store + + # example passing only required values which don't have defaults set + try: + # Add a new pet to the store + api_instance.add_pet(pet_pet) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) ``` ### Parameters @@ -112,25 +114,27 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | Pet id to delete -api_key = 'api_key_example' # str | (optional) - -# example passing only required values which don't have defaults set -try: - # Deletes a pet - api_instance.delete_pet(pet_id) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | Pet id to delete + api_key = 'api_key_example' # str | (optional) + + # example passing only required values which don't have defaults set + try: + # Deletes a pet + api_instance.delete_pet(pet_id) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Deletes a pet + api_instance.delete_pet(pet_id, api_key=api_key) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` ### Parameters @@ -202,17 +206,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # [str] | Status values that need to be considered for filter - -# example passing only required values which don't have defaults set -try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status(status) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + status = ['status_example'] # [str] | Status values that need to be considered for filter + + # example passing only required values which don't have defaults set + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status(status) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` ### Parameters @@ -284,17 +290,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # [str] | Tags to filter by - -# example passing only required values which don't have defaults set -try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + tags = ['tags_example'] # [str] | Tags to filter by + + # example passing only required values which don't have defaults set + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags(tags) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` ### Parameters @@ -347,17 +355,19 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to return - -# example passing only required values which don't have defaults set -try: - # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to return + + # example passing only required values which don't have defaults set + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id(pet_id) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` ### Parameters @@ -428,16 +438,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_pet = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store - -# example passing only required values which don't have defaults set -try: - # Update an existing pet - api_instance.update_pet(pet_pet) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_pet = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store + + # example passing only required values which don't have defaults set + try: + # Update an existing pet + api_instance.update_pet(pet_pet) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) ``` ### Parameters @@ -487,26 +499,28 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet that needs to be updated -name = 'name_example' # str | Updated name of the pet (optional) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet that needs to be updated + name = 'name_example' # str | Updated name of the pet (optional) status = 'status_example' # str | Updated status of the pet (optional) -# example passing only required values which don't have defaults set -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id, name=name, status=status) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters @@ -556,28 +570,30 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update + additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) file = open('/path/to/file', 'rb') # file_type | file to upload (optional) -# example passing only required values which don't have defaults set -try: - # uploads an image - api_response = api_instance.upload_file(pet_id) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) - -# example passing only required values which don't have defaults set -# and optional values -try: - # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) + # example passing only required values which don't have defaults set + try: + # uploads an image + api_response = api_instance.upload_file(pet_id) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # uploads an image + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) ``` ### Parameters @@ -627,28 +643,30 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -required_file = open('/path/to/file', 'rb') # file_type | file to upload -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) - -# example passing only required values which don't have defaults set -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file) - 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 required values which don't have defaults set -# and optional values -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update + required_file = open('/path/to/file', 'rb') # file_type | file to upload + additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + + # example passing only required values which don't have defaults set + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file) + 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 required values which don't have defaults set + # and optional values + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md index a54a8c61fb17..8ef71bd8fc74 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md @@ -25,16 +25,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 'order_id_example' # str | ID of the order that needs to be deleted - -# example passing only required values which don't have defaults set -try: - # Delete purchase order by ID - api_instance.delete_order(order_id) -except petstore_api.ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + order_id = 'order_id_example' # str | ID of the order that needs to be deleted + + # example passing only required values which don't have defaults set + try: + # Delete purchase order by ID + api_instance.delete_order(order_id) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` ### Parameters @@ -87,16 +89,18 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) - -# 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) +# 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 = petstore_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 @@ -137,17 +141,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 56 # int | ID of pet that needs to be fetched - -# example passing only required values which don't have defaults set -try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + order_id = 56 # int | ID of pet that needs to be fetched + + # example passing only required values which don't have defaults set + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id(order_id) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` ### Parameters @@ -191,17 +197,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_order = petstore_api.Order() # order.Order | order placed for purchasing the pet - -# example passing only required values which don't have defaults set -try: - # Place an order for a pet - api_response = api_instance.place_order(order_order) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + order_order = petstore_api.Order() # order.Order | order placed for purchasing the pet + + # example passing only required values which don't have defaults set + try: + # Place an order for a pet + api_response = api_instance.place_order(order_order) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md index 4eb75f428745..720e4a41a461 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md @@ -29,16 +29,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -user_user = petstore_api.User() # user.User | Created user object - -# example passing only required values which don't have defaults set -try: - # Create user - api_instance.create_user(user_user) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + user_user = petstore_api.User() # user.User | Created user object + + # example passing only required values which don't have defaults set + try: + # Create user + api_instance.create_user(user_user) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) ``` ### Parameters @@ -80,16 +82,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -user_user = [petstore_api.User()] # [user.User] | List of user object - -# example passing only required values which don't have defaults set -try: - # Creates list of users with given input array - api_instance.create_users_with_array_input(user_user) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + user_user = [petstore_api.User()] # [user.User] | List of user object + + # example passing only required values which don't have defaults set + try: + # Creates list of users with given input array + api_instance.create_users_with_array_input(user_user) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` ### Parameters @@ -131,16 +135,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -user_user = [petstore_api.User()] # [user.User] | List of user object - -# example passing only required values which don't have defaults set -try: - # Creates list of users with given input array - api_instance.create_users_with_list_input(user_user) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + user_user = [petstore_api.User()] # [user.User] | List of user object + + # example passing only required values which don't have defaults set + try: + # Creates list of users with given input array + api_instance.create_users_with_list_input(user_user) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` ### Parameters @@ -184,16 +190,18 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be deleted - -# example passing only required values which don't have defaults set -try: - # Delete user - api_instance.delete_user(username) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be deleted + + # example passing only required values which don't have defaults set + try: + # Delete user + api_instance.delete_user(username) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) ``` ### Parameters @@ -236,17 +244,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. - -# example passing only required values which don't have defaults set -try: - # Get user by user name - api_response = api_instance.get_user_by_name(username) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. + + # example passing only required values which don't have defaults set + try: + # Get user by user name + api_response = api_instance.get_user_by_name(username) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` ### Parameters @@ -290,18 +300,20 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The user name for login -password = 'password_example' # str | The password for login in clear text - -# example passing only required values which don't have defaults set -try: - # Logs user into the system - api_response = api_instance.login_user(username, password) - pprint(api_response) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | The user name for login + password = 'password_example' # str | The password for login in clear text + + # example passing only required values which don't have defaults set + try: + # Logs user into the system + api_response = api_instance.login_user(username, password) + pprint(api_response) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) ``` ### Parameters @@ -345,15 +357,17 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() - -# example, this endpoint has no required or optional parameters -try: - # Logs out current logged in user session - api_instance.logout_user() -except petstore_api.ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Logs out current logged in user session + api_instance.logout_user() + except petstore_api.ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) ``` ### Parameters @@ -394,17 +408,19 @@ import time import petstore_api from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | name that need to be deleted -user_user = petstore_api.User() # user.User | Updated user object - -# example passing only required values which don't have defaults set -try: - # Updated user - api_instance.update_user(username, user_user) -except petstore_api.ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) +# 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 = petstore_api.UserApi(api_client) + username = 'username_example' # str | name that need to be deleted + user_user = petstore_api.User() # user.User | Updated user object + + # example passing only required values which don't have defaults set + try: + # Updated user + api_instance.update_user(username, user_user) + except petstore_api.ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) ``` ### Parameters 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 c5d90d2a0601..9191f25afd98 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 @@ -11,6 +11,7 @@ from __future__ import absolute_import import json +import atexit import mimetypes from multiprocessing.pool import ThreadPool import os @@ -79,11 +80,19 @@ def __init__(self, configuration=None, header_name=None, header_value=None, # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' - def __del__(self): + 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): @@ -91,6 +100,7 @@ def pool(self): 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 diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index 45ff3402d25a..39d427e7cccd 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -54,17 +54,19 @@ from pprint import pprint # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) -client = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(client) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) - +# 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 = petstore_api.AnotherFakeApi(api_client) + client = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(client) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) + ``` ## Documentation for API Endpoints diff --git a/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md index 9f419af3441d..d93ffd79f195 100644 --- a/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md @@ -23,16 +23,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.AnotherFakeApi() -client = petstore_api.Client() # Client | client model - -try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(client) - pprint(api_response) -except ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.AnotherFakeApi(api_client) + client = petstore_api.Client() # Client | client model + + try: + # To test special tags + api_response = api_instance.call_123_test_special_tags(client) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python/docs/DefaultApi.md b/samples/openapi3/client/petstore/python/docs/DefaultApi.md index 92e27f40a24c..dbb994da49c2 100644 --- a/samples/openapi3/client/petstore/python/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python/docs/DefaultApi.md @@ -21,14 +21,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.DefaultApi() - -try: - api_response = api_instance.foo_get() - pprint(api_response) -except ApiException as e: - print("Exception when calling DefaultApi->foo_get: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.DefaultApi(api_client) + + try: + api_response = api_instance.foo_get() + pprint(api_response) + except ApiException as e: + print("Exception when calling DefaultApi->foo_get: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index 428e61341c35..c17ac031d413 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -34,15 +34,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() - -try: - # Health check endpoint - api_response = api_instance.fake_health_get() - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_health_get: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # Health check endpoint + api_response = api_instance.fake_health_get() + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_health_get: %s\n" % e) ``` ### Parameters @@ -84,15 +86,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = True # bool | Input boolean as post body (optional) - -try: - api_response = api_instance.fake_outer_boolean_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = True # bool | Input boolean as post body (optional) + + try: + api_response = api_instance.fake_outer_boolean_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_boolean_serialize: %s\n" % e) ``` ### Parameters @@ -137,15 +141,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) - -try: - api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) + + try: + api_response = api_instance.fake_outer_composite_serialize(outer_composite=outer_composite) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_composite_serialize: %s\n" % e) ``` ### Parameters @@ -190,15 +196,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 3.4 # float | Input number as post body (optional) - -try: - api_response = api_instance.fake_outer_number_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 3.4 # float | Input number as post body (optional) + + try: + api_response = api_instance.fake_outer_number_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_number_serialize: %s\n" % e) ``` ### Parameters @@ -243,15 +251,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -body = 'body_example' # str | Input string as post body (optional) - -try: - api_response = api_instance.fake_outer_string_serialize(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + body = 'body_example' # str | Input string as post body (optional) + + try: + api_response = api_instance.fake_outer_string_serialize(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->fake_outer_string_serialize: %s\n" % e) ``` ### Parameters @@ -296,14 +306,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -file_schema_test_class = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + file_schema_test_class = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | -try: - api_instance.test_body_with_file_schema(file_schema_test_class) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) + try: + api_instance.test_body_with_file_schema(file_schema_test_class) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e) ``` ### Parameters @@ -346,15 +358,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -query = 'query_example' # str | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + query = 'query_example' # str | user = petstore_api.User() # User | -try: - api_instance.test_body_with_query_params(query, user) -except ApiException as e: - print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) + try: + api_instance.test_body_with_query_params(query, user) + except ApiException as e: + print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e) ``` ### Parameters @@ -400,16 +414,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -client = petstore_api.Client() # Client | client model - -try: - # To test \"client\" model - api_response = api_instance.test_client_model(client) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeApi->test_client_model: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + client = petstore_api.Client() # Client | client model + + try: + # To test \"client\" model + api_response = api_instance.test_client_model(client) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeApi->test_client_model: %s\n" % e) ``` ### Parameters @@ -461,9 +477,11 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -number = 3.4 # float | None +# 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 = petstore_api.FakeApi(api_client) + number = 3.4 # float | None double = 3.4 # float | None pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None byte = 'byte_example' # str | None @@ -478,11 +496,11 @@ date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional) password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) -try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -except ApiException as e: - print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) + try: + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) + except ApiException as e: + print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) ``` ### Parameters @@ -541,9 +559,11 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') enum_query_string_array = ['enum_query_string_array_example'] # list[str] | Query parameter enum test (string array) (optional) enum_query_string = '-efg' # str | Query parameter enum test (string) (optional) (default to '-efg') @@ -552,11 +572,11 @@ enum_query_double = 3.4 # float | Query parameter enum test (double) (optional) enum_form_string_array = '$' # list[str] | Form parameter enum test (string array) (optional) (default to '$') enum_form_string = '-efg' # str | Form parameter enum test (string) (optional) (default to '-efg') -try: - # To test enum parameters - api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) -except ApiException as e: - print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) + try: + # To test enum parameters + api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string) + except ApiException as e: + print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e) ``` ### Parameters @@ -615,20 +635,22 @@ configuration.access_token = 'YOUR_BEARER_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) -required_string_group = 56 # int | Required String in group parameters +# 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 = petstore_api.FakeApi(api_client) + required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters required_int64_group = 56 # int | Required Integer in group parameters string_group = 56 # int | String in group parameters (optional) boolean_group = True # bool | Boolean in group parameters (optional) int64_group = 56 # int | Integer in group parameters (optional) -try: - # Fake endpoint to test group parameters (optional) - api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) -except ApiException as e: - print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) + try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) ``` ### Parameters @@ -676,15 +698,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -request_body = {'key': 'request_body_example'} # dict(str, str) | request body - -try: - # test inline additionalProperties - api_instance.test_inline_additional_properties(request_body) -except ApiException as e: - print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + request_body = {'key': 'request_body_example'} # dict(str, str) | request body + + try: + # test inline additionalProperties + api_instance.test_inline_additional_properties(request_body) + except ApiException as e: + print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e) ``` ### Parameters @@ -727,16 +751,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -param = 'param_example' # str | field1 +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 -try: - # test json serialization of form data - api_instance.test_json_form_data(param, param2) -except ApiException as e: - print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) + try: + # test json serialization of form data + api_instance.test_json_form_data(param, param2) + except ApiException as e: + print("Exception when calling FakeApi->test_json_form_data: %s\n" % e) ``` ### Parameters @@ -782,18 +808,20 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.FakeApi() -pipe = ['pipe_example'] # list[str] | +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + pipe = ['pipe_example'] # list[str] | ioutil = ['ioutil_example'] # list[str] | http = ['http_example'] # list[str] | url = ['url_example'] # list[str] | context = ['context_example'] # list[str] | -try: - api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) -except ApiException as e: - print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) + try: + api_instance.test_query_parameter_collection_format(pipe, ioutil, http, url, context) + except ApiException as e: + print("Exception when calling FakeApi->test_query_parameter_collection_format: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md index 5397122203be..3606bdea3aa1 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -31,16 +31,18 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) -client = petstore_api.Client() # Client | client model - -try: - # To test class name in snake case - api_response = api_instance.test_classname(client) - pprint(api_response) -except ApiException as e: - print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) +# 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 = petstore_api.FakeClassnameTags123Api(api_client) + client = petstore_api.Client() # Client | client model + + try: + # To test class name in snake case + api_response = api_instance.test_classname(client) + pprint(api_response) + except ApiException as e: + print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python/docs/PetApi.md b/samples/openapi3/client/petstore/python/docs/PetApi.md index 5bbf43d4c291..40d68d83cdba 100644 --- a/samples/openapi3/client/petstore/python/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/PetApi.md @@ -35,15 +35,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Add a new pet to the store - api_instance.add_pet(pet) -except ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Add a new pet to the store + api_instance.add_pet(pet) + except ApiException as e: + print("Exception when calling PetApi->add_pet: %s\n" % e) ``` ### Parameters @@ -92,16 +94,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | Pet id to delete +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) -try: - # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key) -except ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) + try: + # Deletes a pet + api_instance.delete_pet(pet_id, api_key=api_key) + except ApiException as e: + print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` ### Parameters @@ -153,16 +157,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -status = ['status_example'] # list[str] | Status values that need to be considered for filter - -try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status(status) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + status = ['status_example'] # list[str] | Status values that need to be considered for filter + + try: + # Finds Pets by status + api_response = api_instance.find_pets_by_status(status) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` ### Parameters @@ -214,16 +220,18 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -tags = ['tags_example'] # list[str] | Tags to filter by - -try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + tags = ['tags_example'] # list[str] | Tags to filter by + + try: + # Finds Pets by tags + api_response = api_instance.find_pets_by_tags(tags) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` ### Parameters @@ -277,16 +285,18 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to return - -try: - # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to return + + try: + # Find pet by ID + api_response = api_instance.get_pet_by_id(pet_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` ### Parameters @@ -337,15 +347,17 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store - -try: - # Update an existing pet - api_instance.update_pet(pet) -except ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) +# 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 = petstore_api.PetApi(api_client) + pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store + + try: + # Update an existing pet + api_instance.update_pet(pet) + except ApiException as e: + print("Exception when calling PetApi->update_pet: %s\n" % e) ``` ### Parameters @@ -396,17 +408,19 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet that needs to be updated +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) status = 'status_example' # str | Updated status of the pet (optional) -try: - # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status) -except ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) + try: + # Updates a pet in the store with form data + api_instance.update_pet_with_form(pet_id, name=name, status=status) + except ApiException as e: + print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` ### Parameters @@ -457,18 +471,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) file = '/path/to/file' # file | file to upload (optional) -try: - # uploads an image - api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file: %s\n" % e) + try: + # uploads an image + api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file: %s\n" % e) ``` ### Parameters @@ -519,18 +535,20 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update +# 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 = petstore_api.PetApi(api_client) + pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) -try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) + try: + # uploads an image (required) + api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata) + pprint(api_response) + except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python/docs/StoreApi.md b/samples/openapi3/client/petstore/python/docs/StoreApi.md index aa2aafec8052..5f5d3ef34118 100644 --- a/samples/openapi3/client/petstore/python/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/StoreApi.md @@ -26,15 +26,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 'order_id_example' # str | ID of the order that needs to be deleted - -try: - # Delete purchase order by ID - api_instance.delete_order(order_id) -except ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 'order_id_example' # str | ID of the order that needs to be deleted + + try: + # Delete purchase order by ID + api_instance.delete_order(order_id) + except ApiException as e: + print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` ### Parameters @@ -88,15 +90,17 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" -# Create an instance of the API class -api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) - -try: - # Returns pet inventories by status - api_response = api_instance.get_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_inventory: %s\n" % e) +# 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 = petstore_api.StoreApi(api_client) + + try: + # Returns pet inventories by status + api_response = api_instance.get_inventory() + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_inventory: %s\n" % e) ``` ### Parameters @@ -138,16 +142,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order_id = 56 # int | ID of pet that needs to be fetched - -try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order_id = 56 # int | ID of pet that needs to be fetched + + try: + # Find purchase order by ID + api_response = api_instance.get_order_by_id(order_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` ### Parameters @@ -192,16 +198,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.StoreApi() -order = petstore_api.Order() # Order | order placed for purchasing the pet - -try: - # Place an order for a pet - api_response = api_instance.place_order(order) - pprint(api_response) -except ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.StoreApi(api_client) + order = petstore_api.Order() # Order | order placed for purchasing the pet + + try: + # Place an order for a pet + api_response = api_instance.place_order(order) + pprint(api_response) + except ApiException as e: + print("Exception when calling StoreApi->place_order: %s\n" % e) ``` ### Parameters diff --git a/samples/openapi3/client/petstore/python/docs/UserApi.md b/samples/openapi3/client/petstore/python/docs/UserApi.md index cd3eee511500..6de550edd989 100644 --- a/samples/openapi3/client/petstore/python/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/UserApi.md @@ -30,15 +30,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -user = petstore_api.User() # User | Created user object - -try: - # Create user - api_instance.create_user(user) -except ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + user = petstore_api.User() # User | Created user object + + try: + # Create user + api_instance.create_user(user) + except ApiException as e: + print("Exception when calling UserApi->create_user: %s\n" % e) ``` ### Parameters @@ -81,15 +83,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -user = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_array_input(user) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + user = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_array_input(user) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` ### Parameters @@ -132,15 +136,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -user = [petstore_api.User()] # list[User] | List of user object - -try: - # Creates list of users with given input array - api_instance.create_users_with_list_input(user) -except ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + user = [petstore_api.User()] # list[User] | List of user object + + try: + # Creates list of users with given input array + api_instance.create_users_with_list_input(user) + except ApiException as e: + print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` ### Parameters @@ -185,15 +191,17 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be deleted - -try: - # Delete user - api_instance.delete_user(username) -except ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be deleted + + try: + # Delete user + api_instance.delete_user(username) + except ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) ``` ### Parameters @@ -237,16 +245,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. - -try: - # Get user by user name - api_response = api_instance.get_user_by_name(username) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. + + try: + # Get user by user name + api_response = api_instance.get_user_by_name(username) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` ### Parameters @@ -291,17 +301,19 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | The user name for login +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text -try: - # Logs user into the system - api_response = api_instance.login_user(username, password) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) + try: + # Logs user into the system + api_response = api_instance.login_user(username, password) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->login_user: %s\n" % e) ``` ### Parameters @@ -346,14 +358,16 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() - -try: - # Logs out current logged in user session - api_instance.logout_user() -except ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + + try: + # Logs out current logged in user session + api_instance.logout_user() + except ApiException as e: + print("Exception when calling UserApi->logout_user: %s\n" % e) ``` ### Parameters @@ -395,16 +409,18 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# Create an instance of the API class -api_instance = petstore_api.UserApi() -username = 'username_example' # str | name that need to be deleted +# Enter a context with an instance of the API client +with petstore_api.ApiClient() as api_client: + # Create an instance of the API class + api_instance = petstore_api.UserApi(api_client) + username = 'username_example' # str | name that need to be deleted user = petstore_api.User() # User | Updated user object -try: - # Updated user - api_instance.update_user(username, user) -except ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) + try: + # Updated user + api_instance.update_user(username, user) + except ApiException as e: + print("Exception when calling UserApi->update_user: %s\n" % e) ``` ### Parameters 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 a18f322840f2..aec97a99e067 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -10,6 +10,7 @@ from __future__ import absolute_import +import atexit import datetime from dateutil.parser import parse import json @@ -80,11 +81,19 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.user_agent = 'OpenAPI-Generator/1.0.0/python' self.client_side_validation = configuration.client_side_validation - def __del__(self): + 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): @@ -92,6 +101,7 @@ def pool(self): 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 From 0f48ab8b15d94860e39e4f31260f02a8808c2371 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 29 Jan 2020 16:09:08 +0800 Subject: [PATCH 13/72] Add bkabrda to Java technical committee (#5141) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da24519d45a3..a5b5451764c6 100644 --- a/README.md +++ b/README.md @@ -924,7 +924,7 @@ If you want to join the committee, please kindly apply by sending an email to te | GraphQL | @renepardon (2018/12) | | Groovy | | | Haskell | | -| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) | +| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @bkabrda (2020/01) | | Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) | | Lua | @daurnimator (2017/08) | | Nim | | From f37951a0bae6b2eb1996427a6e31f8d77951bcb6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 29 Jan 2020 16:20:50 +0800 Subject: [PATCH 14/72] Add a link to dev.to article (#5142) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5b5451764c6..86a0f282887b 100644 --- a/README.md +++ b/README.md @@ -727,8 +727,10 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) - 2019-12-17 - [OpenAPI Generator で OAuth2 アクセストークン発行のコードまで生成してみる](https://www.techscore.com/blog/2019/12/17/openapi-generator-oauth2-accesstoken/) by [TECHSCORE](https://www.techscore.com/blog/) - 2019-12-23 - [Use Ada for Your Web Development](https://www.electronicdesign.com/technologies/embedded-revolution/article/21119177/use-ada-for-your-web-development) by [Stephane Carrez](https://github.com/stcarrez) -- 2019-01-17 - [OpenAPI demo for Pulp 3.0 GA](https://www.youtube.com/watch?v=mFBP-M0ZPfw&t=178s) by [Pulp](https://www.youtube.com/channel/UCI43Ffs4VPDv7awXvvBJfRQ) at [Youtube](https://www.youtube.com/) -- 2019-01-19 - [Why document a REST API as code?](https://dev.to/rolfstreefkerk/why-document-a-rest-api-as-code-5e7p) by [Rolf Streefkerk](https://github.com/rpstreef) at [DEV Community](https://dev.to) +- 2020-01-17 - [OpenAPI demo for Pulp 3.0 GA](https://www.youtube.com/watch?v=mFBP-M0ZPfw&t=178s) by [Pulp](https://www.youtube.com/channel/UCI43Ffs4VPDv7awXvvBJfRQ) at [Youtube](https://www.youtube.com/) +- 2020-01-19 - [Why document a REST API as code?](https://dev.to/rolfstreefkerk/why-document-a-rest-api-as-code-5e7p) by [Rolf Streefkerk](https://github.com/rpstreef) at [DEV Community](https://dev.to) +- 2020-01-28 - [Get Your Serverless Swagger Back with OpenAPI](https://dev.to/matttyler/get-your-serverless-swagger-back-with-openapi-48gc) by [Matt Tyler](https://dev.to/matttyler) +- ## [6 - About Us](#table-of-contents) From 1ac0f141a6a14d1563eb248258d688e2cca29bf8 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Wed, 29 Jan 2020 03:28:42 -0500 Subject: [PATCH 15/72] [feature] Default CI log level for slf4j-simple to error to prevent noise (#5118) * [feature] Log "debounce" filter to remove spam. * [log] slf4j-simple should be optional This also sets the default log level to ERROR during CI builds for many mvn invocations. This should reduce noise in the logs. * [log] Rely only on mvn loglevel=error for now * [cli] Clean up unused dependency * [log] Change level to error/warn in more CI --- .travis.yml | 12 ++++++------ CI/.drone.yml | 4 ++-- CI/bitrise.yml | 2 +- CI/circle_parallel.sh | 8 ++++---- appveyor.yml | 2 +- bin/openapi3/run-all-petstore | 1 + bin/utils/ensure-up-to-date | 3 +-- circle.yml | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c3abe8a927b..f439e764404e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,13 +133,13 @@ script: - /bin/bash ./bin/utils/detect_tab_in_java_class.sh # run integration tests defined in maven pom.xml # WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet. - - mvn --quiet --batch-mode --show-version clean install - - mvn --quiet --batch-mode --show-version verify -Psamples + - mvn --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - mvn --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error # test maven plugin - - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml - - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml - - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml - - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml + - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error # test gradle plugin - (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/CI/.drone.yml b/CI/.drone.yml index 8594d0b486db..04523009a088 100644 --- a/CI/.drone.yml +++ b/CI/.drone.yml @@ -29,8 +29,8 @@ steps: - name: java11-test image: openjdk:11.0 commands: - - ./mvnw clean install - - ./mvnw --quiet verify -Psamples.droneio + - ./mvnw -quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error + - ./mvnw --quiet verify -Psamples.droneio -Dorg.slf4j.simpleLogger.defaultLogLevel=error # test all generators with fake petstore spec (2.0, 3.0) - /bin/bash bin/utils/test-fake-petstore-for-all.sh # generate test scripts diff --git a/CI/bitrise.yml b/CI/bitrise.yml index cfdb8601ecf3..4b07417c80b1 100644 --- a/CI/bitrise.yml +++ b/CI/bitrise.yml @@ -28,7 +28,7 @@ workflows: set -e - mvn package + mvn package -Dorg.slf4j.simpleLogger.defaultLogLevel=error title: Build openapi-generator - script@1.1.5: title: Update Swift4 samples diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index b7142b28a9dc..913ef4754c42 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -11,8 +11,8 @@ if [ "$NODE_INDEX" = "1" ]; then echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..." #cp CI/pom.xml.circleci pom.xml java -version - mvn --quiet verify -Psamples.circleci - mvn --quiet javadoc:javadoc -Psamples.circleci + mvn --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error + mvn --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error elif [ "$NODE_INDEX" = "2" ]; then # run ensure-up-to-date sample script on SNAPSHOT version only @@ -47,13 +47,13 @@ elif [ "$NODE_INDEX" = "2" ]; then sudo apt-get -y build-dep libcurl4-gnutls-dev sudo apt-get -y install libcurl4-gnutls-dev # run integration tests - mvn --quiet verify -Psamples.misc + mvn --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error else echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..." sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 java -version #cp CI/pom.xml.circleci.java7 pom.xml - mvn --quiet verify -Psamples.circleci.jdk7 + mvn --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error fi diff --git a/appveyor.yml b/appveyor.yml index b029aa6944d0..febaf777b639 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -48,7 +48,7 @@ build_script: - nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln - msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" # install openapi-generator locally - - mvn clean install --quiet + - mvn clean install --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error # run the locally installed openapi-generator-gradle-plugin - gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info test_script: diff --git a/bin/openapi3/run-all-petstore b/bin/openapi3/run-all-petstore index ece3a1a14be9..4ee75b99f629 100755 --- a/bin/openapi3/run-all-petstore +++ b/bin/openapi3/run-all-petstore @@ -10,6 +10,7 @@ sleep 10 successes=0 failures=0 +export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" for SCRIPT in $(ls -l ./bin/openapi3/*.sh | grep -v all) do if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index b2a8c19ab4a0..9d03f59123be 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -93,8 +93,7 @@ declare -a always_iterate=( "${root}/bin/utils/export_generators_readme.sh" ) -export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true" - +export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" if [ "true" = "$batch_mode" ]; then if [ ! -f "$executable" ]; then (cd "${root}" && mvn -B clean package -DskipTests=true -Dmaven.javadoc.skip=true) diff --git a/circle.yml b/circle.yml index 7534998122d9..7f42b3471147 100644 --- a/circle.yml +++ b/circle.yml @@ -66,7 +66,7 @@ jobs: - run: sleep 30 - run: cat /etc/hosts # Test - - run: mvn --quiet clean install + - run: mvn --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error - run: ./CI/circle_parallel.sh # Save dependency cache - save_cache: From 8214460ec5339bed03ed5e9d01a5ef99d16f38ea Mon Sep 17 00:00:00 2001 From: "Yutaka.Miyamae" <48900426+yutaka0m@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:30:33 +0900 Subject: [PATCH 16/72] Add deprecated annotation in kotlin-spring (#5090) * add Deprecated in kotlin dataClass * add deprecated in CodegenProperty * format (Column limit: 100) * set property.deprecated * add test * run ./bin/kotlin-springboot-petstore-all.sh * trim space --- .../openapitools/codegen/CodegenProperty.java | 27 ++++++----- .../openapitools/codegen/DefaultCodegen.java | 6 ++- .../kotlin-spring/dataClassOptVar.mustache | 3 +- .../codegen/DefaultCodegenTest.java | 16 +++++++ .../resources/3_0/property-deplicated.yaml | 46 +++++++++++++++++++ .../.openapi-generator/VERSION | 2 +- .../main/kotlin/org/openapitools/model/Pet.kt | 4 +- 7 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/property-deplicated.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index d2f0a5ee3b14..c3257231e28f 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 @@ -54,6 +54,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti public boolean exclusiveMaximum; public boolean hasMore; public boolean required; + public boolean deprecated; public boolean secondaryParam; public boolean hasMoreNonReadOnly; // for model constructor, true if next property is not readonly public boolean isPrimitiveType; @@ -554,6 +555,7 @@ public String toString() { sb.append(", exclusiveMaximum=").append(exclusiveMaximum); sb.append(", hasMore=").append(hasMore); sb.append(", required=").append(required); + sb.append(", deprecated=").append(deprecated); sb.append(", secondaryParam=").append(secondaryParam); sb.append(", hasMoreNonReadOnly=").append(hasMoreNonReadOnly); sb.append(", isPrimitiveType=").append(isPrimitiveType); @@ -619,6 +621,7 @@ public boolean equals(Object o) { exclusiveMaximum == that.exclusiveMaximum && hasMore == that.hasMore && required == that.required && + deprecated == this.deprecated && secondaryParam == that.secondaryParam && hasMoreNonReadOnly == that.hasMoreNonReadOnly && isPrimitiveType == that.isPrimitiveType && @@ -698,16 +701,18 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(openApiType, baseName, complexType, getter, setter, description, dataType, - datatypeWithEnum, dataFormat, name, min, max, defaultValue, defaultValueWithParam, baseType, - containerType, title, unescapedDescription, maxLength, minLength, pattern, example, jsonSchema, - minimum, maximum, exclusiveMinimum, exclusiveMaximum, hasMore, required, secondaryParam, - hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, isInteger, - isLong, isNumber, isFloat, isDouble, isByteArray, isBinary, isFile, isBoolean, isDate, isDateTime, - isUuid, isUri, isEmail, isFreeFormObject, isListContainer, isMapContainer, isEnum, isReadOnly, - isWriteOnly, isNullable, isSelfReference, isCircularReference, _enum, allowableValues, items, - mostInnerItems, vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase, - nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName, xmlNamespace, - isXmlWrapped, multipleOf); + return Objects.hash(openApiType, baseName, complexType, getter, setter, description, + dataType, datatypeWithEnum, dataFormat, name, min, max, defaultValue, + defaultValueWithParam, baseType, containerType, title, unescapedDescription, + maxLength, minLength, pattern, example, jsonSchema, minimum, maximum, + exclusiveMinimum, exclusiveMaximum, hasMore, required, deprecated, secondaryParam, + hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, + isInteger, isLong, isNumber, isFloat, isDouble, isByteArray, isBinary, isFile, + isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, + isListContainer, isMapContainer, isEnum, isReadOnly, isWriteOnly, isNullable, + isSelfReference, isCircularReference, _enum, allowableValues, items, mostInnerItems, + vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase, + nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName, + xmlNamespace, isXmlWrapped); } } 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 6fd90ee23022..ac72e5811541 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 @@ -2255,6 +2255,10 @@ public CodegenProperty fromProperty(String name, Schema p) { property.defaultValue = toDefaultValue(p); property.defaultValueWithParam = toDefaultValueWithParam(name, p); property.jsonSchema = Json.pretty(p); + + if (p.getDeprecated() != null) { + property.deprecated = p.getDeprecated(); + } if (p.getReadOnly() != null) { property.isReadOnly = p.getReadOnly(); } @@ -5477,4 +5481,4 @@ public FeatureSet getFeatureSet() { public void setFeatureSet(final FeatureSet featureSet) { this.featureSet = featureSet == null ? DefaultFeatureSet : featureSet; } -} +} \ No newline at end of file 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 5e801f735768..0f5001411af8 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,5 @@ {{#useBeanValidation}}{{#required}} {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} + @Deprecated(message=""){{/deprecated}} @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ 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 1c134dcb2d03..83dfc91ebd25 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 @@ -678,6 +678,22 @@ public void testNullableProperty() { Assert.assertTrue(property.isNullable); } + @Test + public void testDeprecatedProperty() { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/property-deplicated.yaml"); + new InlineModelResolver().flatten(openAPI); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + final Map responseProperties = Collections.unmodifiableMap(openAPI.getComponents().getSchemas().get("Response").getProperties()); + final Map requestProperties = Collections.unmodifiableMap(openAPI.getComponents().getSchemas().get("Response").getProperties()); + + Assert.assertTrue(codegen.fromProperty("firstName",(Schema) responseProperties.get("firstName")).deprecated); + Assert.assertFalse(codegen.fromProperty("customerCode",(Schema) responseProperties.get("customerCode")).deprecated); + Assert.assertTrue(codegen.fromProperty("firstName",(Schema) requestProperties.get("firstName")).deprecated); + Assert.assertFalse(codegen.fromProperty("customerCode",(Schema) requestProperties.get("customerCode")).deprecated); + } + @Test public void integerSchemaPropertyAndModelTest() { OpenAPI openAPI = TestUtils.createOpenAPI(); diff --git a/modules/openapi-generator/src/test/resources/3_0/property-deplicated.yaml b/modules/openapi-generator/src/test/resources/3_0/property-deplicated.yaml new file mode 100644 index 000000000000..d4d8220c33ac --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/property-deplicated.yaml @@ -0,0 +1,46 @@ +openapi: 3.0.1 +info: + version: 1.0.0 + title: Example + license: + name: MIT +servers: + - url: http://api.example.xyz/v1 +paths: + /deprecated-test: + x-swagger-router-controller: /deprecated-test + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Request' + responses: + '200': + description: responses + content: + application/json: + schema: + $ref: '#/components/schemas/Response' +components: + schemas: + Request: + type: object + properties: + customerCode: + type: string + example: '0001' + firstName: + type: string + deprecated: true + example: 'first' + Response: + type: object + properties: + customerCode: + type: string + example: '0001' + firstName: + type: string + deprecated: true + example: 'first' diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index d168f1d8bdaa..58592f031f65 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file 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 f0ff8c00c1df..5868cb23e3ff 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 @@ -16,10 +16,10 @@ import io.swagger.annotations.ApiModelProperty /** * A pet for sale in the pet store - * @param id - * @param category * @param name * @param photoUrls + * @param id + * @param category * @param tags * @param status pet status in the store */ From e27700cfee07be5413221413b1b668d3de259296 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Wed, 29 Jan 2020 17:50:06 +0900 Subject: [PATCH 17/72] [csharp-netcore] Support .NET Core 3.0/3.1 and .NET Standard 2.1 (#5111) * Add .NET Core 3.x / .NET Standard 2.1 * Fixed test project target framework * Fixed missing sync property * Update generator docs --- docs/generators/csharp-netcore.md | 2 +- .../languages/CSharpNetCoreClientCodegen.java | 44 +++++++++++++------ .../csharp-netcore/TestProject.mustache | 3 +- .../netcore_testproject.mustache | 2 +- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 7b67601f3d3c..8cf2d0ee54ad 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -25,7 +25,7 @@ sidebar_label: csharp-netcore |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.|
**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
**netcoreapp2.0**
.NET Core 2.0 compatible
|netstandard2.0| +|targetFramework|The target .NET framework version.|
**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
|netstandard2.0| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |validatable|Generates self-validatable models.| |true| 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 f17168d19d78..95ced94f2f8e 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 @@ -56,7 +56,11 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { FrameworkStrategy.NETSTANDARD_1_5, FrameworkStrategy.NETSTANDARD_1_6, FrameworkStrategy.NETSTANDARD_2_0, - FrameworkStrategy.NETCOREAPP_2_0 + FrameworkStrategy.NETSTANDARD_2_1, + FrameworkStrategy.NETCOREAPP_2_0, + FrameworkStrategy.NETCOREAPP_2_1, + FrameworkStrategy.NETCOREAPP_3_0, + FrameworkStrategy.NETCOREAPP_3_1 ); private static FrameworkStrategy defaultFramework = FrameworkStrategy.NETSTANDARD_2_0; protected final Map frameworks; @@ -67,6 +71,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { // Defines TargetFrameworkVersion in csproj files protected String targetFramework = defaultFramework.name; + protected String testTargetFramework = defaultFramework.testTargetFramework; // Defines nuget identifiers for target framework protected String targetFrameworkNuget = targetFramework; @@ -548,6 +553,7 @@ public void processOpts() { setTargetFrameworkNuget(strategy.getNugetFrameworkIdentifier()); setTargetFramework(strategy.name); + setTestTargetFramework(strategy.testTargetFramework); if (strategy != FrameworkStrategy.NETSTANDARD_2_0) { LOGGER.warn("If using built-in templates-RestSharp only supports netstandard 2.0 or later."); @@ -571,6 +577,7 @@ public void processOpts() { syncStringProperty(additionalProperties, CodegenConstants.MODEL_PACKAGE, this::setModelPackage, modelPackage); syncStringProperty(additionalProperties, CodegenConstants.OPTIONAL_PROJECT_GUID, this::setPackageGuid, packageGuid); syncStringProperty(additionalProperties, "targetFrameworkNuget", this::setTargetFrameworkNuget, this.targetFrameworkNuget); + syncStringProperty(additionalProperties, "testTargetFramework", this::setTestTargetFramework, this.testTargetFramework); syncBooleanProperty(additionalProperties, "netStandard", this::setNetStandard, this.netStandard); @@ -702,6 +709,10 @@ public void setTargetFramework(String dotnetFramework) { LOGGER.info("Generating code for .NET Framework " + this.targetFramework); } + public void setTestTargetFramework(String testTargetFramework) { + this.testTargetFramework = testTargetFramework; + } + public void setTargetFrameworkNuget(String targetFrameworkNuget) { this.targetFrameworkNuget = targetFrameworkNuget; } @@ -854,34 +865,41 @@ private void syncStringProperty(final Map additionalProperties, // https://docs.microsoft.com/en-us/dotnet/standard/net-standard @SuppressWarnings("Duplicates") private static abstract class FrameworkStrategy { - static FrameworkStrategy NETSTANDARD_1_3 = new FrameworkStrategy("netstandard1.3", ".NET Standard 1.3 compatible", "v4.6.1") { + static FrameworkStrategy NETSTANDARD_1_3 = new FrameworkStrategy("netstandard1.3", ".NET Standard 1.3 compatible", "netcoreapp2.0") { }; - static FrameworkStrategy NETSTANDARD_1_4 = new FrameworkStrategy("netstandard1.4", ".NET Standard 1.4 compatible", "v4.6.1") { + static FrameworkStrategy NETSTANDARD_1_4 = new FrameworkStrategy("netstandard1.4", ".NET Standard 1.4 compatible", "netcoreapp2.0") { }; - static FrameworkStrategy NETSTANDARD_1_5 = new FrameworkStrategy("netstandard1.5", ".NET Standard 1.5 compatible", "v4.6.1") { + static FrameworkStrategy NETSTANDARD_1_5 = new FrameworkStrategy("netstandard1.5", ".NET Standard 1.5 compatible", "netcoreapp2.0") { }; - static FrameworkStrategy NETSTANDARD_1_6 = new FrameworkStrategy("netstandard1.6", ".NET Standard 1.6 compatible", "v4.6.1") { + static FrameworkStrategy NETSTANDARD_1_6 = new FrameworkStrategy("netstandard1.6", ".NET Standard 1.6 compatible", "netcoreapp2.0") { }; - static FrameworkStrategy NETSTANDARD_2_0 = new FrameworkStrategy("netstandard2.0", ".NET Standard 2.0 compatible", "v4.6.1") { + static FrameworkStrategy NETSTANDARD_2_0 = new FrameworkStrategy("netstandard2.0", ".NET Standard 2.0 compatible", "netcoreapp2.0") { }; - static FrameworkStrategy NETCOREAPP_2_0 = new FrameworkStrategy("netcoreapp2.0", ".NET Core 2.0 compatible", "v4.6.1", Boolean.FALSE) { - + static FrameworkStrategy NETSTANDARD_2_1 = new FrameworkStrategy("netstandard2.1", ".NET Standard 2.1 compatible", "netcoreapp3.0") { + }; + static FrameworkStrategy NETCOREAPP_2_0 = new FrameworkStrategy("netcoreapp2.0", ".NET Core 2.0 compatible", "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_3_0 = new FrameworkStrategy("netcoreapp3.0", ".NET Core 3.0 compatible", "netcoreapp3.0", Boolean.FALSE) { + }; + static FrameworkStrategy NETCOREAPP_3_1 = new FrameworkStrategy("netcoreapp3.1", ".NET Core 3.1 compatible", "netcoreapp3.1", Boolean.FALSE) { }; protected String name; protected String description; - protected String dotNetFrameworkVersion; + protected String testTargetFramework; private Boolean isNetStandard = Boolean.TRUE; - FrameworkStrategy(String name, String description, String dotNetFrameworkVersion) { + FrameworkStrategy(String name, String description, String testTargetFramework) { this.name = name; this.description = description; - this.dotNetFrameworkVersion = dotNetFrameworkVersion; + this.testTargetFramework = testTargetFramework; } - FrameworkStrategy(String name, String description, String dotNetFrameworkVersion, Boolean isNetStandard) { + FrameworkStrategy(String name, String description, String testTargetFramework, Boolean isNetStandard) { this.name = name; this.description = description; - this.dotNetFrameworkVersion = dotNetFrameworkVersion; + this.testTargetFramework = testTargetFramework; this.isNetStandard = isNetStandard; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache index 9ef7ae726ae9..a5d124698075 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache @@ -17,8 +17,7 @@ Properties {{testPackageName}} {{testPackageName}} - - netcoreapp2.0 + {{testTargetFramework}} false 512 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 aa4f8beb8b03..d6faf0b43f97 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 @@ -13,7 +13,7 @@ true true {{testPackageName}} - netcoreapp2.0 + {{testTargetFramework}} false From f4185b8d9e30612fa33f579ff5396aa3b5c748ed Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Wed, 29 Jan 2020 16:57:31 +0800 Subject: [PATCH 18/72] [C-libcurl] Support HTTPS/SSL for the C client (#5140) --- .../resources/C-libcurl/apiClient.c.mustache | 23 +++++++++++++++++++ .../resources/C-libcurl/apiClient.h.mustache | 2 ++ 2 files changed, 25 insertions(+) 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 0c3df633df32..69b2e74c3310 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 @@ -13,6 +13,7 @@ apiClient_t *apiClient_create() { curl_global_init(CURL_GLOBAL_ALL); apiClient_t *apiClient = malloc(sizeof(apiClient_t)); apiClient->basePath = strdup("{{{basePath}}}"); + apiClient->caPath = NULL; apiClient->dataReceived = NULL; apiClient->response_code = 0; {{#hasAuthMethods}} @@ -34,6 +35,7 @@ apiClient_t *apiClient_create() { } apiClient_t *apiClient_create_with_base_path(const char *basePath +, const char *caPath {{#hasAuthMethods}} {{#authMethods}} {{#isApiKey}} @@ -49,6 +51,13 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath }else{ apiClient->basePath = strdup("{{{basePath}}}"); } + + if(caPath){ + apiClient->caPath = strdup(caPath); + }else{ + apiClient->caPath = NULL; + } + apiClient->dataReceived = NULL; apiClient->response_code = 0; {{#hasAuthMethods}} @@ -83,6 +92,9 @@ void apiClient_free(apiClient_t *apiClient) { if(apiClient->basePath) { free(apiClient->basePath); } + if(apiClient->caPath) { + free(apiClient->caPath); + } {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} @@ -375,6 +387,17 @@ void apiClient_invoke(apiClient_t *apiClient, free(headerValueToWrite); } } + + if( strstr(apiClient->basePath, "https") != NULL ){ + if (apiClient->caPath) { + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, true); + curl_easy_setopt(handle, CURLOPT_CAINFO, apiClient->caPath); + } else { + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, false); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, false); + } + } + {{#hasAuthMethods}} {{#authMethods}} {{#isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache index 5abae164e683..08458228e9dc 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache @@ -11,6 +11,7 @@ typedef struct apiClient_t { char *basePath; + char *caPath; void *dataReceived; long response_code; {{#hasAuthMethods}} @@ -38,6 +39,7 @@ typedef struct binary_t apiClient_t* apiClient_create(); apiClient_t* apiClient_create_with_base_path(const char *basePath +, const char *caPath {{#hasAuthMethods}} {{#authMethods}} {{#isApiKey}} From 6cf58afdc5592198db28d1342be399e7130f31f7 Mon Sep 17 00:00:00 2001 From: LoveIsGrief Date: Wed, 29 Jan 2020 10:18:57 +0100 Subject: [PATCH 19/72] Switch to predominant use of appDescriptionWithNewLines in README.mustache (#5109) Descriptions tend to get lengthy and can include multiple lines. New lines are important to markdown formatting/syntax and can't just be ignored. Resolves https://github.com/OpenAPITools/openapi-generator/issues/3704 --- .../src/main/resources/Eiffel/README.mustache | 6 +++--- .../src/main/resources/Groovy/README.mustache | 6 +++--- .../src/main/resources/Java/README.mustache | 2 +- .../resources/Java/libraries/microprofile/README.mustache | 6 +++--- .../main/resources/Java/libraries/native/README.mustache | 2 +- .../resources/Java/libraries/okhttp-gson/README.mustache | 2 +- .../src/main/resources/Javascript/README.mustache | 6 +++--- .../src/main/resources/Javascript/es6/README.mustache | 6 +++--- .../src/main/resources/aspnetcore/2.0/README.mustache | 6 +++--- .../src/main/resources/aspnetcore/2.1/README.mustache | 8 ++++---- .../main/resources/cpp-rest-sdk-client/README.mustache | 6 +++--- .../src/main/resources/csharp-dotnet2/README.mustache | 6 +++--- .../src/main/resources/csharp-netcore/README.mustache | 6 +++--- .../src/main/resources/csharp/README.mustache | 6 +++--- .../src/main/resources/dart-dio/README.mustache | 6 +++--- .../src/main/resources/dart-jaguar/README.mustache | 6 +++--- .../src/main/resources/dart/README.mustache | 6 +++--- .../src/main/resources/dart2/README.mustache | 6 +++--- .../src/main/resources/elm/README.mustache | 6 +++--- .../src/main/resources/go-experimental/README.mustache | 6 +++--- .../src/main/resources/go-gin-server/README.mustache | 6 +++--- .../src/main/resources/go-server/README.mustache | 6 +++--- .../src/main/resources/go/README.mustache | 6 +++--- .../graphql-nodejs-express-server/README.mustache | 6 +++--- .../src/main/resources/graphql-schema/README.mustache | 6 +++--- .../src/main/resources/lua/README.mustache | 6 +++--- .../src/main/resources/nim-client/README.mustache | 6 +++--- .../src/main/resources/objc/README.mustache | 6 +++--- .../src/main/resources/ocaml/readme.mustache | 6 +++--- .../src/main/resources/perl/README.mustache | 2 +- .../src/main/resources/php-symfony/README.mustache | 6 +++--- .../src/main/resources/php/README.mustache | 6 +++--- .../src/main/resources/powershell/README.mustache | 6 +++--- .../src/main/resources/protobuf-schema/README.mustache | 6 +++--- .../src/main/resources/python/README.mustache | 6 +++--- .../resources/python/python-experimental/README.mustache | 6 +++--- .../src/main/resources/r/README.mustache | 6 +++--- .../src/main/resources/rust-server/README.mustache | 6 +++--- .../src/main/resources/rust/README.mustache | 6 +++--- .../src/main/resources/scala-akka-client/README.mustache | 4 ++-- .../src/main/resources/scala-httpclient/README.mustache | 8 ++++---- .../src/main/resources/swift4/README.mustache | 6 +++--- .../src/main/resources/swift5/README.mustache | 6 +++--- 43 files changed, 122 insertions(+), 122 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Eiffel/README.mustache b/modules/openapi-generator/src/main/resources/Eiffel/README.mustache index f8ba1b5e2ebc..bc44aa484a51 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/README.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/README.mustache @@ -1,8 +1,8 @@ # Eiffel API client for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/Groovy/README.mustache b/modules/openapi-generator/src/main/resources/Groovy/README.mustache index 424dfb435755..be054fb041c9 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/README.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Groovy package, using the [http-builder-ng library](https://http-builder-ng.github.io/http-builder-ng/), is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/Java/README.mustache b/modules/openapi-generator/src/main/resources/Java/README.mustache index f1bb9f234cdc..917f873d5dce 100644 --- a/modules/openapi-generator/src/main/resources/Java/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/README.mustache @@ -8,7 +8,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescription}}{{{appDescription}}}{{/appDescription}} +{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache index 576e70fe8bae..8d126ada313b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache @@ -1,9 +1,9 @@ # {{appName}} - MicroProfile Rest Client -{{#appDescription}} -{{{appDescription}}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} -{{/appDescription}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. [MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache index 44356cca82c9..f574b47b4853 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache @@ -8,7 +8,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescription}}{{{appDescription}}}{{/appDescription}} +{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache index e459ad31713e..e9be868f52cc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache @@ -6,7 +6,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescription}}{{{appDescription}}}{{/appDescription}} +{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) diff --git a/modules/openapi-generator/src/main/resources/Javascript/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/README.mustache index 2e3ea8723ab5..fccb79dce5b6 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/README.mustache @@ -1,9 +1,9 @@ # {{projectName}} {{moduleName}} - JavaScript client for {{projectName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache index 944e6029d52b..dd4a6721a2d7 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache @@ -1,9 +1,9 @@ # {{projectName}} {{moduleName}} - JavaScript client for {{projectName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache index 71c4cfebb8b3..37794bd48e04 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} - ASP.NET Core 2.0 Server -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Run diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache index 3dda0f304b5d..d7582331bc02 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} - ASP.NET Core 2.0 Server -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Run @@ -25,4 +25,4 @@ cd {{sourceFolder}}/{{packageName}} docker build -t {{dockerTag}} . docker run -p 5000:8080 {{dockerTag}} ``` -{{/isLibrary}} \ No newline at end of file +{{/isLibrary}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache index b17cd6375a4d..950193f45c81 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache @@ -1,8 +1,8 @@ # C++ API client -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache index 38a2937a4765..041dec963b05 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} - the C# library for the {{appName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache index 0521eb9369e6..8ef566b7f35b 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} - the C# library for the {{appName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/csharp/README.mustache b/modules/openapi-generator/src/main/resources/csharp/README.mustache index fbf5001b1d27..474bfe829b40 100644 --- a/modules/openapi-generator/src/main/resources/csharp/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} - the C# library for the {{appName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache index 1367a32a5daf..b304aca42288 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache @@ -1,7 +1,7 @@ # {{pubName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache index 4b1c1420e031..10a11d931e59 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache @@ -1,7 +1,7 @@ # {{pubName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project: diff --git a/modules/openapi-generator/src/main/resources/dart/README.mustache b/modules/openapi-generator/src/main/resources/dart/README.mustache index 02c6cd2116ae..c2052443896b 100644 --- a/modules/openapi-generator/src/main/resources/dart/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart/README.mustache @@ -1,7 +1,7 @@ # {{pubName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/dart2/README.mustache b/modules/openapi-generator/src/main/resources/dart2/README.mustache index 76261fa04673..54e7a4efd5f4 100644 --- a/modules/openapi-generator/src/main/resources/dart2/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/README.mustache @@ -1,7 +1,7 @@ # {{pubName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/elm/README.mustache b/modules/openapi-generator/src/main/resources/elm/README.mustache index e7190da57b1d..932f287c0fae 100644 --- a/modules/openapi-generator/src/main/resources/elm/README.mustache +++ b/modules/openapi-generator/src/main/resources/elm/README.mustache @@ -1,9 +1,9 @@ # Elm API client -{{#appDescription}} -{{{appDescription}}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} -{{/appDescription}} +{{/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. diff --git a/modules/openapi-generator/src/main/resources/go-experimental/README.mustache b/modules/openapi-generator/src/main/resources/go-experimental/README.mustache index 777abc5d06e4..ca2082dc8dc7 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/README.mustache @@ -1,8 +1,8 @@ # Go API client for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache b/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache index 669209a9a84c..3ad44c6fa7a7 100644 --- a/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache @@ -1,8 +1,8 @@ # Go API Server for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This server was generated by the [openapi-generator] diff --git a/modules/openapi-generator/src/main/resources/go-server/README.mustache b/modules/openapi-generator/src/main/resources/go-server/README.mustache index 14083f758474..5a59be673826 100644 --- a/modules/openapi-generator/src/main/resources/go-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/README.mustache @@ -1,8 +1,8 @@ # Go API Server for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This server was generated by the [openapi-generator] diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index b96f612f8a59..8f4afa293efb 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -1,8 +1,8 @@ # Go API client for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache index 4746e0c95a39..2e556cc0666a 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache @@ -1,8 +1,8 @@ # GraphQL express API server -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Requirements diff --git a/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache index 2b8a89c7a187..0ff611e889f5 100644 --- a/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache @@ -1,8 +1,8 @@ # Lua API client for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/lua/README.mustache b/modules/openapi-generator/src/main/resources/lua/README.mustache index 2b8a89c7a187..0ff611e889f5 100644 --- a/modules/openapi-generator/src/main/resources/lua/README.mustache +++ b/modules/openapi-generator/src/main/resources/lua/README.mustache @@ -1,8 +1,8 @@ # Lua API client for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/nim-client/README.mustache b/modules/openapi-generator/src/main/resources/nim-client/README.mustache index f879aee9e0a4..7f664c25e25e 100644 --- a/modules/openapi-generator/src/main/resources/nim-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/nim-client/README.mustache @@ -1,8 +1,8 @@ # Nim API client for {{{appName}}} (Package: {{{packageName}}}) -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/objc/README.mustache b/modules/openapi-generator/src/main/resources/objc/README.mustache index e353062783e7..a5af6dfd37a9 100644 --- a/modules/openapi-generator/src/main/resources/objc/README.mustache +++ b/modules/openapi-generator/src/main/resources/objc/README.mustache @@ -1,8 +1,8 @@ # {{podName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This ObjC package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/ocaml/readme.mustache b/modules/openapi-generator/src/main/resources/ocaml/readme.mustache index 9cd39793a8af..906db4d647aa 100644 --- a/modules/openapi-generator/src/main/resources/ocaml/readme.mustache +++ b/modules/openapi-generator/src/main/resources/ocaml/readme.mustache @@ -1,7 +1,7 @@ # {{{projectName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This OCaml package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/perl/README.mustache b/modules/openapi-generator/src/main/resources/perl/README.mustache index b088e34b852a..93707bd1b6e7 100644 --- a/modules/openapi-generator/src/main/resources/perl/README.mustache +++ b/modules/openapi-generator/src/main/resources/perl/README.mustache @@ -2,7 +2,7 @@ {{moduleName}}::Role - a Moose role for the {{appName}} -{{#appDescription}}{{{appDescription}}}{{/appDescription}} +{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} # VERSION diff --git a/modules/openapi-generator/src/main/resources/php-symfony/README.mustache b/modules/openapi-generator/src/main/resources/php-symfony/README.mustache index f107aa4b30cc..af53b91e07a2 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/README.mustache @@ -1,7 +1,7 @@ # {{bundleName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This [Symfony](https://symfony.com/) bundle is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/php/README.mustache b/modules/openapi-generator/src/main/resources/php/README.mustache index 5d6e8c93ef9d..636a2a98519f 100644 --- a/modules/openapi-generator/src/main/resources/php/README.mustache +++ b/modules/openapi-generator/src/main/resources/php/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/powershell/README.mustache b/modules/openapi-generator/src/main/resources/powershell/README.mustache index 0ff7e5d25f36..fae062b7d2b0 100644 --- a/modules/openapi-generator/src/main/resources/powershell/README.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/README.mustache @@ -1,8 +1,8 @@ # {{packageName}} - the PowerShell module for the {{appName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This PowerShell module is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache b/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache index a516dff1de99..7f8bbe320ebe 100644 --- a/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache +++ b/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache @@ -1,8 +1,8 @@ # gPRC for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/modules/openapi-generator/src/main/resources/python/README.mustache b/modules/openapi-generator/src/main/resources/python/README.mustache index 94d72af33dcd..9d854a4f1b9b 100644 --- a/modules/openapi-generator/src/main/resources/python/README.mustache +++ b/modules/openapi-generator/src/main/resources/python/README.mustache @@ -1,7 +1,7 @@ # {{{projectName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/README.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/README.mustache index f26408cf661a..72c7f3de3f04 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/README.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/README.mustache @@ -1,7 +1,7 @@ # {{{projectName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/r/README.mustache b/modules/openapi-generator/src/main/resources/r/README.mustache index c9dd12a935f6..5ea739218596 100644 --- a/modules/openapi-generator/src/main/resources/r/README.mustache +++ b/modules/openapi-generator/src/main/resources/r/README.mustache @@ -1,8 +1,8 @@ # R API client for {{packageName}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/rust-server/README.mustache b/modules/openapi-generator/src/main/resources/rust-server/README.mustache index 57146ddc4ca8..9ab26d83024c 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/README.mustache @@ -1,8 +1,8 @@ # Rust API for {{{packageName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/rust/README.mustache b/modules/openapi-generator/src/main/resources/rust/README.mustache index 62aa006644da..89648191073b 100644 --- a/modules/openapi-generator/src/main/resources/rust/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust/README.mustache @@ -1,8 +1,8 @@ # Rust API client for {{{packageName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache index c684af83ab20..0a61209568da 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache @@ -6,7 +6,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescription}}{{{appDescription}}}{{/appDescription}} +{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -104,4 +104,4 @@ Class | Method | HTTP request | Description ## Author {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} -{{/hasMore}}{{/apis}}{{/apiInfo}} \ No newline at end of file +{{/hasMore}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache index 045b77f4e866..57673b768dbc 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache @@ -2,10 +2,10 @@ {{appName}} -{{#appDescription}} -{{{appDescription}}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} -{{/appDescription}} +{{/appDescriptionWithNewLines}} # VERSION Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -128,4 +128,4 @@ you just built. ## Author {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} -{{/hasMore}}{{/apis}}{{/apiInfo}} \ No newline at end of file +{{/hasMore}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/swift4/README.mustache b/modules/openapi-generator/src/main/resources/swift4/README.mustache index 8fe60510aa88..da90d5e1b448 100644 --- a/modules/openapi-generator/src/main/resources/swift4/README.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/README.mustache @@ -1,8 +1,8 @@ # Swift4 API client for {{{projectName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. diff --git a/modules/openapi-generator/src/main/resources/swift5/README.mustache b/modules/openapi-generator/src/main/resources/swift5/README.mustache index c9a27d38b658..6ee7cf37afe9 100644 --- a/modules/openapi-generator/src/main/resources/swift5/README.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/README.mustache @@ -1,8 +1,8 @@ # Swift5 API client for {{{projectName}}} -{{#appDescription}} -{{{appDescription}}} -{{/appDescription}} +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. From 76e8e81668c0b762cfccf431d9902cfe9bd466e2 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Wed, 29 Jan 2020 08:30:20 -0500 Subject: [PATCH 20/72] [core] Add back functionality to debug openapi spec, accidentally removed in 4.1.2 (#5147) --- .../main/java/org/openapitools/codegen/DefaultGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 71416272fa5e..2debd1ba7fa1 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 @@ -186,12 +186,12 @@ private void configureGeneratorProperties() { } if (GlobalSettings.getProperty("debugOpenAPI") != null) { - SerializerUtils.toJsonString(openAPI); + System.out.println(SerializerUtils.toJsonString(openAPI)); } else if (GlobalSettings.getProperty("debugSwagger") != null) { // This exists for backward compatibility // We fall to this block only if debugOpenAPI is null. No need to dump this twice. LOGGER.info("Please use system property 'debugOpenAPI' instead of 'debugSwagger'."); - SerializerUtils.toJsonString(openAPI); + System.out.println(SerializerUtils.toJsonString(openAPI)); } config.processOpts(); From 3922607858cee81dc2d24110c7a215b4e748442d Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Thu, 30 Jan 2020 01:52:48 +0900 Subject: [PATCH 21/72] [csharp-netcore] Fixed compiler null-check warning (#5119) * Fixed compiler null-check warning * Rename vendor extensions as `x-csharp-value-type` --- .../languages/CSharpNetCoreClientCodegen.java | 12 ++- .../resources/csharp-netcore/api.mustache | 70 +++++++++++- .../csharp-netcore/modelGeneric.mustache | 37 ++----- .../src/Org.OpenAPITools/Api/FakeApi.cs | 102 ++++-------------- .../src/Org.OpenAPITools/Api/PetApi.cs | 70 ++---------- .../src/Org.OpenAPITools/Api/StoreApi.cs | 14 +-- .../src/Org.OpenAPITools/Model/Animal.cs | 19 +--- .../src/Org.OpenAPITools/Model/Category.cs | 10 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 42 +------- .../src/Org.OpenAPITools/Model/Name.cs | 11 +- .../src/Org.OpenAPITools/Model/Order.cs | 10 +- .../src/Org.OpenAPITools/Model/Pet.cs | 20 +--- .../Model/TypeHolderDefault.cs | 53 +-------- .../Model/TypeHolderExample.cs | 64 ++--------- .../src/Org.OpenAPITools/Api/FakeApi.cs | 102 ++++-------------- .../src/Org.OpenAPITools/Api/PetApi.cs | 70 ++---------- .../src/Org.OpenAPITools/Api/StoreApi.cs | 14 +-- .../src/Org.OpenAPITools/Model/Animal.cs | 19 +--- .../src/Org.OpenAPITools/Model/Category.cs | 10 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 42 +------- .../src/Org.OpenAPITools/Model/Name.cs | 11 +- .../src/Org.OpenAPITools/Model/Order.cs | 10 +- .../src/Org.OpenAPITools/Model/Pet.cs | 20 +--- .../Model/TypeHolderDefault.cs | 53 +-------- .../Model/TypeHolderExample.cs | 64 ++--------- 25 files changed, 191 insertions(+), 758 deletions(-) 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 95ced94f2f8e..f21f156e200c 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 @@ -423,6 +423,10 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert postProcessEmitDefaultValue(property.vendorExtensions); super.postProcessModelProperty(model, property); + + if (!property.isContainer && (nullableType.contains(property.dataType) || property.isEnum)) { + property.vendorExtensions.put("x-csharp-value-type", true); + } } @Override @@ -458,8 +462,12 @@ public void postProcessParameter(CodegenParameter parameter) { postProcessEmitDefaultValue(parameter.vendorExtensions); super.postProcessParameter(parameter); - if (!parameter.required && nullableType.contains(parameter.dataType)) { //optional - parameter.dataType = parameter.dataType + "?"; + if (nullableType.contains(parameter.dataType)) { + if (!parameter.required) { //optional + parameter.dataType = parameter.dataType + "?"; + } else { + parameter.vendorExtensions.put("x-csharp-value-type", true); + } } } 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 7aa39cc22e6f..e8a32d382a8e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -225,14 +225,14 @@ namespace {{packageName}}.{{apiPackage}} public {{packageName}}.Client.ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}} - {{^isNullable}} {{#required}} + {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + {{/vendorExtensions.x-csharp-value-type}} {{/required}} - {{/isNullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -256,10 +256,16 @@ namespace {{packageName}}.{{apiPackage}} if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); {{#pathParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/vendorExtensions.x-csharp-value-type}} {{/pathParams}} {{#queryParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) { foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) @@ -270,12 +276,28 @@ namespace {{packageName}}.{{apiPackage}} } } } + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) + { + foreach (var _kvpValue in _kvp.Value) + { + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); + } + } + {{/vendorExtensions.x-csharp-value-type}} {{/queryParams}} {{#headerParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/vendorExtensions.x-csharp-value-type}} {{/headerParams}} {{#formParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) { {{#isFile}} @@ -285,6 +307,15 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter {{/isFile}} } + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + {{#isFile}} + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/isFile}} + {{^isFile}} + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + {{/isFile}} + {{/vendorExtensions.x-csharp-value-type}} {{/formParams}} {{#bodyParam}} localVarRequestOptions.Data = {{paramName}}; @@ -363,14 +394,14 @@ namespace {{packageName}}.{{apiPackage}} public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}} - {{^isNullable}} {{#required}} + {{^vendorExtensions.x-csharp-value-type}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + {{/vendorExtensions.x-csharp-value-type}} {{/required}} - {{/isNullable}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); @@ -395,10 +426,16 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("Accept", _accept); {{#pathParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/vendorExtensions.x-csharp-value-type}} {{/pathParams}} {{#queryParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) { foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) @@ -409,12 +446,28 @@ namespace {{packageName}}.{{apiPackage}} } } } + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) + { + foreach (var _kvpValue in _kvp.Value) + { + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); + } + } + {{/vendorExtensions.x-csharp-value-type}} {{/queryParams}} {{#headerParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/vendorExtensions.x-csharp-value-type}} {{/headerParams}} {{#formParams}} + {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) { {{#isFile}} @@ -424,6 +477,15 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter {{/isFile}} } + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + {{#isFile}} + localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/isFile}} + {{^isFile}} + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + {{/isFile}} + {{/vendorExtensions.x-csharp-value-type}} {{/formParams}} {{#bodyParam}} localVarRequestOptions.Data = {{paramName}}; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache index 78738eeb1f31..690873e1654d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache @@ -60,28 +60,15 @@ {{#vars}} {{^isInherited}} {{^isReadOnly}} - {{^isNullable}} {{#required}} - {{^isEnum}} + {{^vendorExtensions.x-csharp-value-type}} // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - { - throw new InvalidDataException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); - } - else - { - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - } - - {{/isEnum}} - {{#isEnum}} + this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null");; + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/isEnum}} + {{/vendorExtensions.x-csharp-value-type}} {{/required}} - {{/isNullable}} - {{#isNullable}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/isNullable}} {{/isReadOnly}} {{/isInherited}} {{/vars}} @@ -90,15 +77,13 @@ {{^isReadOnly}} {{^required}} {{#defaultValue}} + {{^vendorExtensions.x-csharp-value-type}} // use default value if no "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" provided - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - { - this.{{name}} = {{{defaultValue}}}; - } - else - { - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - } + this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? {{{defaultValue}}}; + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + {{/vendorExtensions.x-csharp-value-type}} {{/defaultValue}} {{^defaultValue}} this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; 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 a3052b97a29c..6c0797b7ffef 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 @@ -1823,14 +1823,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { - // verify the required parameter 'number' is set - if (number == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - - // verify the required parameter '_double' is set - if (_double == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); @@ -1867,18 +1859,12 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode { localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } - if (number != null) - { - localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - } + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter if (_float != null) { localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } - if (_double != null) - { - localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter - } + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter if (_string != null) { localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter @@ -1977,14 +1963,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// Task of ApiResponse public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { - // verify the required parameter 'number' is set - if (number == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - - // verify the required parameter '_double' is set - if (_double == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); @@ -2022,18 +2000,12 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode { localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } - if (number != null) - { - localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - } + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter if (_float != null) { localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } - if (_double != null) - { - localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter - } + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter if (_string != null) { localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter @@ -2349,18 +2321,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -2376,24 +2336,18 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (requiredStringGroup != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } - if (requiredInt64Group != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } if (stringGroup != null) @@ -2416,8 +2370,7 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode } } } - if (requiredBooleanGroup != null) - localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter @@ -2464,18 +2417,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// Task of ApiResponse public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2492,24 +2433,18 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (requiredStringGroup != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } - if (requiredInt64Group != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } if (stringGroup != null) @@ -2532,8 +2467,7 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode } } } - if (requiredBooleanGroup != null) - localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter 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 5cc53451ed76..5c4a624d26a6 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 @@ -708,10 +708,6 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -727,8 +723,7 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter @@ -773,10 +768,6 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) /// Task of ApiResponse public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -793,8 +784,7 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter @@ -1128,10 +1118,6 @@ public Pet GetPetById (long petId) /// ApiResponse of Pet public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long petId) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -1149,8 +1135,7 @@ public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long p var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) @@ -1191,10 +1176,6 @@ public async System.Threading.Tasks.Task GetPetByIdAsync (long petId) /// Task of ApiResponse (Pet) public async System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long petId) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1213,8 +1194,7 @@ public async System.Threading.Tasks.Task GetPetByIdAsync (long petId) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) @@ -1383,10 +1363,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -1403,8 +1379,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter @@ -1457,10 +1432,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// Task of ApiResponse public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1478,8 +1449,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter @@ -1533,10 +1503,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// ApiResponse of ApiResponse public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -1554,8 +1520,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter @@ -1609,10 +1574,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// Task of ApiResponse (ApiResponse) public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1631,8 +1592,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter @@ -1686,10 +1646,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// ApiResponse of ApiResponse public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); @@ -1711,8 +1667,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter @@ -1766,10 +1721,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// Task of ApiResponse (ApiResponse) public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); @@ -1792,8 +1743,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index 72d56c685afd..bba650881173 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -560,10 +560,6 @@ public Order GetOrderById (long orderId) /// ApiResponse of Order public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (long orderId) { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -581,8 +577,7 @@ public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (lo var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (orderId != null) - localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -618,10 +613,6 @@ public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId) /// Task of ApiResponse (Order) public async System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (long orderId) { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -640,8 +631,7 @@ public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (orderId != null) - localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs index 43b638c4a8d8..6327320a4d71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs @@ -53,24 +53,9 @@ protected Animal() { } public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");; // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } + this.Color = color ?? "red"; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs index 2d2d85c07bbe..474391b16edd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs @@ -45,15 +45,7 @@ protected Category() { } public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Category and cannot be null"); - } - else - { - this.Name = name; - } - + this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");; this.Id = id; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index b68958ed6904..152076d65374 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -56,46 +56,12 @@ protected FormatTest() { } /// bigDecimal. public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - + this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - + this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");; + this.Date = date; // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - + this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");; this.Integer = integer; this.Int32 = int32; this.Int64 = int64; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs index 60adfe8af77c..ca102b37b1e9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs @@ -44,16 +44,7 @@ protected Name() { } /// property. public Name(int name = default(int), string property = default(string)) { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - + this._Name = name; this.Property = property; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs index 0c4a6a5b60f9..7a10e4a0f983 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs @@ -81,15 +81,7 @@ public enum StatusEnum this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } + this.Complete = complete; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs index b7be3ee84f91..4341ff4452a8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs @@ -82,25 +82,9 @@ protected Pet() { } public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - + this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - + this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");; this.Id = id; this.Category = category; this.Tags = tags; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 62151f1edfec..c3933da46a63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -48,55 +48,12 @@ protected TypeHolderDefault() { } public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - + this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");; + this.NumberItem = numberItem; + this.IntegerItem = integerItem; + this.BoolItem = boolItem; // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - + this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 42043170e6a2..ee949e45bc86 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -49,65 +49,13 @@ protected TypeHolderExample() { } public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - + this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");; + this.NumberItem = numberItem; + this.FloatItem = floatItem; + this.IntegerItem = integerItem; + this.BoolItem = boolItem; // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - + this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");; } /// 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 a3052b97a29c..6c0797b7ffef 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 @@ -1823,14 +1823,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { - // verify the required parameter 'number' is set - if (number == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - - // verify the required parameter '_double' is set - if (_double == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); @@ -1867,18 +1859,12 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode { localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } - if (number != null) - { - localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - } + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter if (_float != null) { localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } - if (_double != null) - { - localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter - } + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter if (_string != null) { localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter @@ -1977,14 +1963,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// Task of ApiResponse public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) { - // verify the required parameter 'number' is set - if (number == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - - // verify the required parameter '_double' is set - if (_double == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); @@ -2022,18 +2000,12 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode { localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter } - if (number != null) - { - localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter - } + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter if (_float != null) { localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter } - if (_double != null) - { - localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter - } + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter if (_string != null) { localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter @@ -2349,18 +2321,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -2376,24 +2336,18 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (requiredStringGroup != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } - if (requiredInt64Group != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } if (stringGroup != null) @@ -2416,8 +2370,7 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode } } } - if (requiredBooleanGroup != null) - localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter @@ -2464,18 +2417,6 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode /// Task of ApiResponse public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2492,24 +2433,18 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (requiredStringGroup != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } - if (requiredInt64Group != null) + foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) + foreach (var _kvpValue in _kvp.Value) { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } + localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } if (stringGroup != null) @@ -2532,8 +2467,7 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode } } } - if (requiredBooleanGroup != null) - localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter 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 5cc53451ed76..5c4a624d26a6 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 @@ -708,10 +708,6 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -727,8 +723,7 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter @@ -773,10 +768,6 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) /// Task of ApiResponse public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -793,8 +784,7 @@ public async System.Threading.Tasks.Task AddPetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (apiKey != null) localVarRequestOptions.HeaderParameters.Add("api_key", Org.OpenAPITools.Client.ClientUtils.ParameterToString(apiKey)); // header parameter @@ -1128,10 +1118,6 @@ public Pet GetPetById (long petId) /// ApiResponse of Pet public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long petId) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -1149,8 +1135,7 @@ public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long p var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) @@ -1191,10 +1176,6 @@ public async System.Threading.Tasks.Task GetPetByIdAsync (long petId) /// Task of ApiResponse (Pet) public async System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long petId) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1213,8 +1194,7 @@ public async System.Threading.Tasks.Task GetPetByIdAsync (long petId) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) @@ -1383,10 +1363,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -1403,8 +1379,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter @@ -1457,10 +1432,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// Task of ApiResponse public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = default(string), string status = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1478,8 +1449,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (name != null) { localVarRequestOptions.FormParameters.Add("name", Org.OpenAPITools.Client.ClientUtils.ParameterToString(name)); // form parameter @@ -1533,10 +1503,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// ApiResponse of ApiResponse public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -1554,8 +1520,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter @@ -1609,10 +1574,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// Task of ApiResponse (ApiResponse) public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1631,8 +1592,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter @@ -1686,10 +1646,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// ApiResponse of ApiResponse public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); @@ -1711,8 +1667,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter @@ -1766,10 +1721,6 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) /// Task of ApiResponse (ApiResponse) public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) { - // verify the required parameter 'petId' is set - if (petId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); @@ -1792,8 +1743,7 @@ public async System.Threading.Tasks.Task UpdatePetAsync (Pet body) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (petId != null) - localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter if (additionalMetadata != null) { localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs index 72d56c685afd..bba650881173 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -560,10 +560,6 @@ public Order GetOrderById (long orderId) /// ApiResponse of Order public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (long orderId) { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] _contentTypes = new String[] { @@ -581,8 +577,7 @@ public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (lo var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - if (orderId != null) - localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -618,10 +613,6 @@ public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId) /// Task of ApiResponse (Order) public async System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (long orderId) { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -640,8 +631,7 @@ public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId) foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - if (orderId != null) - localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs index 43b638c4a8d8..6327320a4d71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs @@ -53,24 +53,9 @@ protected Animal() { } public Animal(string className = default(string), string color = "red") { // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");; // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } + this.Color = color ?? "red"; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs index 2d2d85c07bbe..474391b16edd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs @@ -45,15 +45,7 @@ protected Category() { } public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Category and cannot be null"); - } - else - { - this.Name = name; - } - + this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");; this.Id = id; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs index b68958ed6904..152076d65374 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -56,46 +56,12 @@ protected FormatTest() { } /// bigDecimal. public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - + this.Number = number; // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - + this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");; + this.Date = date; // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - + this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");; this.Integer = integer; this.Int32 = int32; this.Int64 = int64; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Name.cs index 60adfe8af77c..ca102b37b1e9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Name.cs @@ -44,16 +44,7 @@ protected Name() { } /// property. public Name(int name = default(int), string property = default(string)) { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - + this._Name = name; this.Property = property; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Order.cs index 0c4a6a5b60f9..7a10e4a0f983 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Order.cs @@ -81,15 +81,7 @@ public enum StatusEnum this.Quantity = quantity; this.ShipDate = shipDate; this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } + this.Complete = complete; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs index b7be3ee84f91..4341ff4452a8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Pet.cs @@ -82,25 +82,9 @@ protected Pet() { } public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - + this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");; // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - + this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");; this.Id = id; this.Category = category; this.Tags = tags; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderDefault.cs index 62151f1edfec..c3933da46a63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderDefault.cs @@ -48,55 +48,12 @@ protected TypeHolderDefault() { } public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - + this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");; + this.NumberItem = numberItem; + this.IntegerItem = integerItem; + this.BoolItem = boolItem; // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - + this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");; } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderExample.cs index 42043170e6a2..ee949e45bc86 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/TypeHolderExample.cs @@ -49,65 +49,13 @@ protected TypeHolderExample() { } public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) { // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - + this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");; + this.NumberItem = numberItem; + this.FloatItem = floatItem; + this.IntegerItem = integerItem; + this.BoolItem = boolItem; // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - + this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");; } /// From a51d02ac615b535e0b49a7e33888f653577ddb03 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 29 Jan 2020 10:10:41 -0800 Subject: [PATCH 22/72] [Python] Fix #5126 operations with req enums of length one (#5129) * Updates ap.mustache for python-experimental, adds test test_test_endpoint_enums_length_one * Removes sortParamsByRequiredFlag from python-experimental * Removes duplicate params from docstring --- docs/generators/python-experimental.md | 1 - .../PythonClientExperimentalCodegen.java | 7 + .../python/python-experimental/api.mustache | 90 +- .../petstore_api/api/another_fake_api.py | 58 +- .../petstore_api/api/fake_api.py | 933 ++++++++++-------- .../api/fake_classname_tags_123_api.py | 58 +- .../petstore_api/api/pet_api.py | 539 +++++----- .../petstore_api/api/store_api.py | 228 +++-- .../petstore_api/api/user_api.py | 466 +++++---- .../python-experimental/test/test_fake_api.py | 50 +- .../petstore_api/api/another_fake_api.py | 58 +- .../petstore_api/api/default_api.py | 54 +- .../petstore_api/api/fake_api.py | 871 +++++++++------- .../api/fake_classname_tags_123_api.py | 58 +- .../petstore_api/api/pet_api.py | 537 +++++----- .../petstore_api/api/store_api.py | 228 +++-- .../petstore_api/api/user_api.py | 466 +++++---- 17 files changed, 2691 insertions(+), 2011 deletions(-) diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 1c42e7691979..483060b622f4 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -12,7 +12,6 @@ sidebar_label: python-experimental |packageUrl|python package URL.| |null| |packageVersion|python package version.| |1.0.0| |projectName|python project name in setup.py (e.g. petstore-api).| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |useNose|use the nose test framework| |false| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 94aa9c2f0765..33472480b13a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -97,6 +97,13 @@ public PythonClientExperimentalCodegen() { modelTestTemplateFiles.remove("model_test.mustache", ".py"); modelTestTemplateFiles.put("python-experimental/model_test.mustache", ".py"); + // this generator does not use SORT_PARAMS_BY_REQUIRED_FLAG + // this generator uses the following order for endpoint paramters and model properties + // required params/props with no enum of length one + // required params/props with enum of length one (which is used to set a default value as a python named arg value) + // optional params/props with **kwargs in python + cliOptions.remove(4); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.EXPERIMENTAL) .build(); diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache index 8390a848d263..4cf1d423e830 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api.mustache @@ -45,7 +45,20 @@ class {{classname}}(object): self.api_client = api_client {{#operation}} - def __{{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501 + def __{{operationId}}( + self, +{{#requiredParams}} +{{^defaultValue}} + {{paramName}}, +{{/defaultValue}} +{{/requiredParams}} +{{#requiredParams}} +{{#defaultValue}} + {{paramName}}={{{defaultValue}}}, +{{/defaultValue}} +{{/requiredParams}} + **kwargs + ): """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} @@ -53,40 +66,51 @@ class {{classname}}(object): {{/notes}} This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True -{{#sortParamsByRequiredFlag}} - >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True) -{{/sortParamsByRequiredFlag}} -{{^sortParamsByRequiredFlag}} - >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async_req=True) -{{/sortParamsByRequiredFlag}} + >>> thread = api.{{operationId}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#requiredParams}}{{#defaultValue}}{{paramName}}={{{defaultValue}}}, {{/defaultValue}}{{/requiredParams}}async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. -{{#allParams}} - :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} -{{/allParams}} - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} - If the method is called asynchronously, returns the request - thread. +{{#requiredParams}} +{{^hasMore}} + Args: +{{/hasMore}} +{{/requiredParams}} +{{#requiredParams}} +{{^defaultValue}} + {{paramName}} ({{dataType}}):{{#description}} {{description}}{{/description}} +{{/defaultValue}} +{{/requiredParams}} +{{#requiredParams}} +{{#defaultValue}} + {{paramName}} ({{dataType}}):{{#description}} {{description}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}] +{{/defaultValue}} +{{/requiredParams}} + + Keyword Args:{{#optionalParams}} + {{paramName}} ({{dataType}}):{{#description}} {{description}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}}{{/optionalParams}} + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py index 7a8e081050d1..2db9b6de9252 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __call_123_test_special_tags(self, body, **kwargs): # noqa: E501 + def __call_123_test_special_tags( + self, + body, + **kwargs + ): """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 @@ -58,30 +62,34 @@ def __call_123_test_special_tags(self, body, **kwargs): # noqa: E501 >>> thread = api.call_123_test_special_tags(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param client.Client body: client model (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: client.Client - If the method is called asynchronously, returns the request - thread. + Args: + body (client.Client): client model + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + client.Client + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py index 13b39417a25f..8c50f5e15d50 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py @@ -55,7 +55,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __create_xml_item(self, xml_item, **kwargs): # noqa: E501 + def __create_xml_item( + self, + xml_item, + **kwargs + ): """creates an XmlItem # noqa: E501 this route creates an XmlItem # noqa: E501 @@ -64,30 +68,34 @@ def __create_xml_item(self, xml_item, **kwargs): # noqa: E501 >>> thread = api.create_xml_item(xml_item, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param xml_item.XmlItem xml_item: XmlItem Body (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + xml_item (xml_item.XmlItem): XmlItem Body + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -167,7 +175,10 @@ def __create_xml_item(self, xml_item, **kwargs): # noqa: E501 callable=__create_xml_item ) - def __fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_boolean_serialize( + self, + **kwargs + ): """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 @@ -176,30 +187,33 @@ def __fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_boolean_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param bool body: Input boolean as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: bool - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (bool): Input boolean as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + bool + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -270,7 +284,10 @@ def __fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_boolean_serialize ) - def __fake_outer_composite_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_composite_serialize( + self, + **kwargs + ): """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 @@ -279,30 +296,33 @@ def __fake_outer_composite_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_composite_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param outer_composite.OuterComposite body: Input composite as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: outer_composite.OuterComposite - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (outer_composite.OuterComposite): Input composite as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + outer_composite.OuterComposite + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -373,7 +393,10 @@ def __fake_outer_composite_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_composite_serialize ) - def __fake_outer_enum_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_enum_serialize( + self, + **kwargs + ): """fake_outer_enum_serialize # noqa: E501 Test serialization of outer enum # noqa: E501 @@ -382,30 +405,33 @@ def __fake_outer_enum_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_enum_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param outer_enum.OuterEnum body: Input enum as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: outer_enum.OuterEnum - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (outer_enum.OuterEnum): Input enum as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + outer_enum.OuterEnum + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -476,7 +502,10 @@ def __fake_outer_enum_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_enum_serialize ) - def __fake_outer_number_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_number_serialize( + self, + **kwargs + ): """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 @@ -485,30 +514,33 @@ def __fake_outer_number_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_number_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param outer_number.OuterNumber body: Input number as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: outer_number.OuterNumber - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (outer_number.OuterNumber): Input number as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + outer_number.OuterNumber + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -579,7 +611,10 @@ def __fake_outer_number_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_number_serialize ) - def __fake_outer_string_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_string_serialize( + self, + **kwargs + ): """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 @@ -588,30 +623,33 @@ def __fake_outer_string_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_string_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str body: Input string as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: str - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (str): Input string as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -682,7 +720,11 @@ def __fake_outer_string_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_string_serialize ) - def __test_body_with_file_schema(self, body, **kwargs): # noqa: E501 + def __test_body_with_file_schema( + self, + body, + **kwargs + ): """test_body_with_file_schema # noqa: E501 For this test, the body for this request much reference a schema named `File`. # noqa: E501 @@ -691,30 +733,34 @@ def __test_body_with_file_schema(self, body, **kwargs): # noqa: E501 >>> thread = api.test_body_with_file_schema(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param file_schema_test_class.FileSchemaTestClass body: (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + body (file_schema_test_class.FileSchemaTestClass): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -789,7 +835,12 @@ def __test_body_with_file_schema(self, body, **kwargs): # noqa: E501 callable=__test_body_with_file_schema ) - def __test_body_with_query_params(self, query, body, **kwargs): # noqa: E501 + def __test_body_with_query_params( + self, + query, + body, + **kwargs + ): """test_body_with_query_params # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -797,31 +848,35 @@ def __test_body_with_query_params(self, query, body, **kwargs): # noqa: E501 >>> thread = api.test_body_with_query_params(query, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str query: (required) - :param user.User body: (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + query (str): + body (user.User): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -904,7 +959,11 @@ def __test_body_with_query_params(self, query, body, **kwargs): # noqa: E501 callable=__test_body_with_query_params ) - def __test_client_model(self, body, **kwargs): # noqa: E501 + def __test_client_model( + self, + body, + **kwargs + ): """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 @@ -913,30 +972,34 @@ def __test_client_model(self, body, **kwargs): # noqa: E501 >>> thread = api.test_client_model(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param client.Client body: client model (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: client.Client - If the method is called asynchronously, returns the request - thread. + Args: + body (client.Client): client model + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + client.Client + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1013,43 +1076,55 @@ def __test_client_model(self, body, **kwargs): # noqa: E501 callable=__test_client_model ) - def __test_endpoint_enums_length_one(self, query_integer, query_string, path_string, path_integer, header_number, **kwargs): # noqa: E501 + def __test_endpoint_enums_length_one( + self, + query_integer=3, + query_string='brillig', + path_string='hello', + path_integer=34, + header_number=1.234, + **kwargs + ): """test_endpoint_enums_length_one # noqa: E501 This route has required values with enums of 1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.test_endpoint_enums_length_one(query_integer, query_string, path_string, path_integer, header_number, async_req=True) + >>> thread = api.test_endpoint_enums_length_one(query_integer=3, query_string='brillig', path_string='hello', path_integer=34, header_number=1.234, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int query_integer: (required) - :param str query_string: (required) - :param str path_string: (required) - :param int path_integer: (required) - :param float header_number: (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + query_integer (int): defaults to 3, must be one of [3] + query_string (str): defaults to 'brillig', must be one of ['brillig'] + path_string (str): defaults to 'hello', must be one of ['hello'] + path_integer (int): defaults to 34, must be one of [34] + header_number (float): defaults to 1.234, must be one of [1.234] + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1180,7 +1255,14 @@ def __test_endpoint_enums_length_one(self, query_integer, query_string, path_str callable=__test_endpoint_enums_length_one ) - def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 + def __test_endpoint_parameters( + self, + number, + double, + pattern_without_delimiter, + byte, + **kwargs + ): """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -1189,43 +1271,47 @@ def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param float number: None (required) - :param float double: None (required) - :param str pattern_without_delimiter: None (required) - :param str byte: None (required) - :param int integer: None - :param int int32: None - :param int int64: None - :param float float: None - :param str string: None - :param file_type binary: None - :param date date: None - :param datetime date_time: None - :param str password: None - :param str param_callback: None - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + number (float): None + double (float): None + pattern_without_delimiter (str): None + byte (str): None + + Keyword Args: + integer (int): None. [optional] + int32 (int): None. [optional] + int64 (int): None. [optional] + float (float): None. [optional] + string (str): None. [optional] + binary (file_type): None. [optional] + date (date): None. [optional] + date_time (datetime): None. [optional] + password (str): None. [optional] + param_callback (str): None. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1426,7 +1512,10 @@ def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, callable=__test_endpoint_parameters ) - def __test_enum_parameters(self, **kwargs): # noqa: E501 + def __test_enum_parameters( + self, + **kwargs + ): """To test enum parameters # noqa: E501 To test enum parameters # noqa: E501 @@ -1435,37 +1524,40 @@ def __test_enum_parameters(self, **kwargs): # noqa: E501 >>> thread = api.test_enum_parameters(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] enum_header_string_array: Header parameter enum test (string array) - :param str enum_header_string: Header parameter enum test (string) - :param [str] enum_query_string_array: Query parameter enum test (string array) - :param str enum_query_string: Query parameter enum test (string) - :param int enum_query_integer: Query parameter enum test (double) - :param float enum_query_double: Query parameter enum test (double) - :param [str] enum_form_string_array: Form parameter enum test (string array) - :param str enum_form_string: Form parameter enum test (string) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + enum_header_string_array ([str]): Header parameter enum test (string array). [optional] + enum_header_string (str): Header parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' + enum_query_string_array ([str]): Query parameter enum test (string array). [optional] + enum_query_string (str): Query parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' + enum_query_integer (int): Query parameter enum test (double). [optional] + enum_query_double (float): Query parameter enum test (double). [optional] + enum_form_string_array ([str]): Form parameter enum test (string array). [optional] if omitted the server will use the default value of '$' + enum_form_string (str): Form parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1626,7 +1718,13 @@ def __test_enum_parameters(self, **kwargs): # noqa: E501 callable=__test_enum_parameters ) - def __test_group_parameters(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501 + def __test_group_parameters( + self, + required_string_group, + required_boolean_group, + required_int64_group, + **kwargs + ): """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 @@ -1635,35 +1733,39 @@ def __test_group_parameters(self, required_string_group, required_boolean_group, >>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int required_string_group: Required String in group parameters (required) - :param bool required_boolean_group: Required Boolean in group parameters (required) - :param int required_int64_group: Required Integer in group parameters (required) - :param int string_group: String in group parameters - :param bool boolean_group: Boolean in group parameters - :param int int64_group: Integer in group parameters - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + required_string_group (int): Required String in group parameters + required_boolean_group (bool): Required Boolean in group parameters + required_int64_group (int): Required Integer in group parameters + + Keyword Args: + string_group (int): String in group parameters. [optional] + boolean_group (bool): Boolean in group parameters. [optional] + int64_group (int): Integer in group parameters. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1768,7 +1870,11 @@ def __test_group_parameters(self, required_string_group, required_boolean_group, callable=__test_group_parameters ) - def __test_inline_additional_properties(self, param, **kwargs): # noqa: E501 + def __test_inline_additional_properties( + self, + param, + **kwargs + ): """test inline additionalProperties # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1776,30 +1882,34 @@ def __test_inline_additional_properties(self, param, **kwargs): # noqa: E501 >>> thread = api.test_inline_additional_properties(param, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param {str: (str,)} param: request body (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + param ({str: (str,)}): request body + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1874,7 +1984,12 @@ def __test_inline_additional_properties(self, param, **kwargs): # noqa: E501 callable=__test_inline_additional_properties ) - def __test_json_form_data(self, param, param2, **kwargs): # noqa: E501 + def __test_json_form_data( + self, + param, + param2, + **kwargs + ): """test json serialization of form data # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1882,31 +1997,35 @@ def __test_json_form_data(self, param, param2, **kwargs): # noqa: E501 >>> thread = api.test_json_form_data(param, param2, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str param: field1 (required) - :param str param2: field2 (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + param (str): field1 + param2 (str): field2 + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py index ba0386f633a0..ab817996b0e6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api.py @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __test_classname(self, body, **kwargs): # noqa: E501 + def __test_classname( + self, + body, + **kwargs + ): """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 @@ -58,30 +62,34 @@ def __test_classname(self, body, **kwargs): # noqa: E501 >>> thread = api.test_classname(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param client.Client body: client model (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: client.Client - If the method is called asynchronously, returns the request - thread. + Args: + body (client.Client): client model + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + client.Client + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py b/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py index 3eeae195e0aa..829534ed7900 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/pet_api.py @@ -50,7 +50,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __add_pet(self, body, **kwargs): # noqa: E501 + def __add_pet( + self, + body, + **kwargs + ): """Add a new pet to the store # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -58,30 +62,34 @@ def __add_pet(self, body, **kwargs): # noqa: E501 >>> thread = api.add_pet(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param pet.Pet body: Pet object that needs to be added to the store (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + body (pet.Pet): Pet object that needs to be added to the store + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -159,7 +167,11 @@ def __add_pet(self, body, **kwargs): # noqa: E501 callable=__add_pet ) - def __delete_pet(self, pet_id, **kwargs): # noqa: E501 + def __delete_pet( + self, + pet_id, + **kwargs + ): """Deletes a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -167,31 +179,35 @@ def __delete_pet(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.delete_pet(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: Pet id to delete (required) - :param str api_key: - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): Pet id to delete + + Keyword Args: + api_key (str): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -272,7 +288,11 @@ def __delete_pet(self, pet_id, **kwargs): # noqa: E501 callable=__delete_pet ) - def __find_pets_by_status(self, status, **kwargs): # noqa: E501 + def __find_pets_by_status( + self, + status, + **kwargs + ): """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 @@ -281,30 +301,34 @@ def __find_pets_by_status(self, status, **kwargs): # noqa: E501 >>> thread = api.find_pets_by_status(status, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] status: Status values that need to be considered for filter (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: [pet.Pet] - If the method is called asynchronously, returns the request - thread. + Args: + status ([str]): Status values that need to be considered for filter + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + [pet.Pet] + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -391,7 +415,11 @@ def __find_pets_by_status(self, status, **kwargs): # noqa: E501 callable=__find_pets_by_status ) - def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 + def __find_pets_by_tags( + self, + tags, + **kwargs + ): """Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 @@ -400,30 +428,34 @@ def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 >>> thread = api.find_pets_by_tags(tags, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] tags: Tags to filter by (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: [pet.Pet] - If the method is called asynchronously, returns the request - thread. + Args: + tags ([str]): Tags to filter by + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + [pet.Pet] + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -503,7 +535,11 @@ def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 callable=__find_pets_by_tags ) - def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 + def __get_pet_by_id( + self, + pet_id, + **kwargs + ): """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 @@ -512,30 +548,34 @@ def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.get_pet_by_id(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet to return (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: pet.Pet - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet to return + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + pet.Pet + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -614,7 +654,11 @@ def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 callable=__get_pet_by_id ) - def __update_pet(self, body, **kwargs): # noqa: E501 + def __update_pet( + self, + body, + **kwargs + ): """Update an existing pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -622,30 +666,34 @@ def __update_pet(self, body, **kwargs): # noqa: E501 >>> thread = api.update_pet(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param pet.Pet body: Pet object that needs to be added to the store (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + body (pet.Pet): Pet object that needs to be added to the store + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -723,7 +771,11 @@ def __update_pet(self, body, **kwargs): # noqa: E501 callable=__update_pet ) - def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 + def __update_pet_with_form( + self, + pet_id, + **kwargs + ): """Updates a pet in the store with form data # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -731,32 +783,36 @@ def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.update_pet_with_form(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet that needs to be updated (required) - :param str name: Updated name of the pet - :param str status: Updated status of the pet - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet that needs to be updated + + Keyword Args: + name (str): Updated name of the pet. [optional] + status (str): Updated status of the pet. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -844,7 +900,11 @@ def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 callable=__update_pet_with_form ) - def __upload_file(self, pet_id, **kwargs): # noqa: E501 + def __upload_file( + self, + pet_id, + **kwargs + ): """uploads an image # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -852,33 +912,37 @@ def __upload_file(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.upload_file(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet to update (required) - :param str additional_metadata: Additional data to pass to server - :param file_type file: file to upload - :param [file_type] files: files to upload - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: api_response.ApiResponse - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet to update + + Keyword Args: + additional_metadata (str): Additional data to pass to server. [optional] + file (file_type): file to upload. [optional] + files ([file_type]): files to upload. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + api_response.ApiResponse + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -974,7 +1038,12 @@ def __upload_file(self, pet_id, **kwargs): # noqa: E501 callable=__upload_file ) - def __upload_file_with_required_file(self, pet_id, required_file, **kwargs): # noqa: E501 + def __upload_file_with_required_file( + self, + pet_id, + required_file, + **kwargs + ): """uploads an image (required) # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -982,32 +1051,36 @@ def __upload_file_with_required_file(self, pet_id, required_file, **kwargs): # >>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet to update (required) - :param file_type required_file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: api_response.ApiResponse - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet to update + required_file (file_type): file to upload + + Keyword Args: + additional_metadata (str): Additional data to pass to server. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + api_response.ApiResponse + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/petstore_api/api/store_api.py b/samples/client/petstore/python-experimental/petstore_api/api/store_api.py index e429d348e670..890474acc039 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/store_api.py @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __delete_order(self, order_id, **kwargs): # noqa: E501 + def __delete_order( + self, + order_id, + **kwargs + ): """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 @@ -58,30 +62,34 @@ def __delete_order(self, order_id, **kwargs): # noqa: E501 >>> thread = api.delete_order(order_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str order_id: ID of the order that needs to be deleted (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + order_id (str): ID of the order that needs to be deleted + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -155,7 +163,10 @@ def __delete_order(self, order_id, **kwargs): # noqa: E501 callable=__delete_order ) - def __get_inventory(self, **kwargs): # noqa: E501 + def __get_inventory( + self, + **kwargs + ): """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 @@ -164,29 +175,32 @@ def __get_inventory(self, **kwargs): # noqa: E501 >>> thread = api.get_inventory(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: {str: (int,)} - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + {str: (int,)} + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -255,7 +269,11 @@ def __get_inventory(self, **kwargs): # noqa: E501 callable=__get_inventory ) - def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 + def __get_order_by_id( + self, + order_id, + **kwargs + ): """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 @@ -264,30 +282,34 @@ def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 >>> thread = api.get_order_by_id(order_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int order_id: ID of pet that needs to be fetched (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: order.Order - If the method is called asynchronously, returns the request - thread. + Args: + order_id (int): ID of pet that needs to be fetched + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + order.Order + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -370,7 +392,11 @@ def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 callable=__get_order_by_id ) - def __place_order(self, body, **kwargs): # noqa: E501 + def __place_order( + self, + body, + **kwargs + ): """Place an order for a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -378,30 +404,34 @@ def __place_order(self, body, **kwargs): # noqa: E501 >>> thread = api.place_order(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param order.Order body: order placed for purchasing the pet (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: order.Order - If the method is called asynchronously, returns the request - thread. + Args: + body (order.Order): order placed for purchasing the pet + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + order.Order + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/petstore_api/api/user_api.py b/samples/client/petstore/python-experimental/petstore_api/api/user_api.py index 9f754bb50a60..74389cbf2420 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/user_api.py @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __create_user(self, body, **kwargs): # noqa: E501 + def __create_user( + self, + body, + **kwargs + ): """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -58,30 +62,34 @@ def __create_user(self, body, **kwargs): # noqa: E501 >>> thread = api.create_user(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param user.User body: Created user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + body (user.User): Created user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -154,7 +162,11 @@ def __create_user(self, body, **kwargs): # noqa: E501 callable=__create_user ) - def __create_users_with_array_input(self, body, **kwargs): # noqa: E501 + def __create_users_with_array_input( + self, + body, + **kwargs + ): """Creates list of users with given input array # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -162,30 +174,34 @@ def __create_users_with_array_input(self, body, **kwargs): # noqa: E501 >>> thread = api.create_users_with_array_input(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [user.User] body: List of user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + body ([user.User]): List of user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -258,7 +274,11 @@ def __create_users_with_array_input(self, body, **kwargs): # noqa: E501 callable=__create_users_with_array_input ) - def __create_users_with_list_input(self, body, **kwargs): # noqa: E501 + def __create_users_with_list_input( + self, + body, + **kwargs + ): """Creates list of users with given input array # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -266,30 +286,34 @@ def __create_users_with_list_input(self, body, **kwargs): # noqa: E501 >>> thread = api.create_users_with_list_input(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [user.User] body: List of user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + body ([user.User]): List of user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -362,7 +386,11 @@ def __create_users_with_list_input(self, body, **kwargs): # noqa: E501 callable=__create_users_with_list_input ) - def __delete_user(self, username, **kwargs): # noqa: E501 + def __delete_user( + self, + username, + **kwargs + ): """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -371,30 +399,34 @@ def __delete_user(self, username, **kwargs): # noqa: E501 >>> thread = api.delete_user(username, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: The name that needs to be deleted (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + username (str): The name that needs to be deleted + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -468,7 +500,11 @@ def __delete_user(self, username, **kwargs): # noqa: E501 callable=__delete_user ) - def __get_user_by_name(self, username, **kwargs): # noqa: E501 + def __get_user_by_name( + self, + username, + **kwargs + ): """Get user by user name # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -476,30 +512,34 @@ def __get_user_by_name(self, username, **kwargs): # noqa: E501 >>> thread = api.get_user_by_name(username, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: The name that needs to be fetched. Use user1 for testing. (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: user.User - If the method is called asynchronously, returns the request - thread. + Args: + username (str): The name that needs to be fetched. Use user1 for testing. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + user.User + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -576,7 +616,12 @@ def __get_user_by_name(self, username, **kwargs): # noqa: E501 callable=__get_user_by_name ) - def __login_user(self, username, password, **kwargs): # noqa: E501 + def __login_user( + self, + username, + password, + **kwargs + ): """Logs user into the system # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -584,31 +629,35 @@ def __login_user(self, username, password, **kwargs): # noqa: E501 >>> thread = api.login_user(username, password, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: The user name for login (required) - :param str password: The password for login in clear text (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: str - If the method is called asynchronously, returns the request - thread. + Args: + username (str): The user name for login + password (str): The password for login in clear text + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -693,7 +742,10 @@ def __login_user(self, username, password, **kwargs): # noqa: E501 callable=__login_user ) - def __logout_user(self, **kwargs): # noqa: E501 + def __logout_user( + self, + **kwargs + ): """Logs out current logged in user session # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -701,29 +753,32 @@ def __logout_user(self, **kwargs): # noqa: E501 >>> thread = api.logout_user(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -788,7 +843,12 @@ def __logout_user(self, **kwargs): # noqa: E501 callable=__logout_user ) - def __update_user(self, username, body, **kwargs): # noqa: E501 + def __update_user( + self, + username, + body, + **kwargs + ): """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -797,31 +857,35 @@ def __update_user(self, username, body, **kwargs): # noqa: E501 >>> thread = api.update_user(username, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: name that need to be deleted (required) - :param user.User body: Updated user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + username (str): name that need to be deleted + body (user.User): Updated user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False diff --git a/samples/client/petstore/python-experimental/test/test_fake_api.py b/samples/client/petstore/python-experimental/test/test_fake_api.py index 0f4e875d197d..7a6f1d6810a0 100644 --- a/samples/client/petstore/python-experimental/test/test_fake_api.py +++ b/samples/client/petstore/python-experimental/test/test_fake_api.py @@ -5,14 +5,19 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - OpenAPI spec version: 1.0.0 + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +import six import unittest +if six.PY3: + from unittest.mock import patch +else: + from mock import patch import petstore_api from petstore_api.api.fake_api import FakeApi # noqa: E501 @@ -28,6 +33,13 @@ def setUp(self): def tearDown(self): pass + def test_create_xml_item(self): + """Test case for create_xml_item + + creates an XmlItem # noqa: E501 + """ + pass + def test_fake_outer_boolean_serialize(self): """Test case for fake_outer_boolean_serialize @@ -64,6 +76,12 @@ def test_fake_outer_string_serialize(self): """ pass + def test_test_body_with_file_schema(self): + """Test case for test_body_with_file_schema + + """ + pass + def test_test_body_with_query_params(self): """Test case for test_body_with_query_params @@ -77,6 +95,29 @@ def test_test_client_model(self): """ pass + def test_test_endpoint_enums_length_one(self): + """Test case for test_endpoint_enums_length_one + + """ + # when we omit the required enums of length one, they are still set + endpoint = self.api.test_endpoint_enums_length_one + with patch.object(endpoint, 'call_with_http_info') as call_with_http_info: + endpoint() + call_with_http_info.assert_called_with( + _check_input_type=True, + _check_return_type=True, + _host_index=0, + _preload_content=True, + _request_timeout=None, + _return_http_data_only=True, + async_req=False, + header_number=1.234, + path_integer=34, + path_string='hello', + query_integer=3, + query_string='brillig' + ) + def test_test_endpoint_parameters(self): """Test case for test_endpoint_parameters @@ -115,6 +156,13 @@ def test_test_enum_parameters(self): with self.assertRaises(petstore_api.ApiValueError): self.api.test_enum_parameters(**keyword_args) + def test_test_group_parameters(self): + """Test case for test_group_parameters + + Fake endpoint to test group parameters (optional) # noqa: E501 + """ + pass + def test_test_inline_additional_properties(self): """Test case for test_inline_additional_properties 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 index 487b15dd082d..fbf98194fcd8 100644 --- 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 @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __call_123_test_special_tags(self, client_client, **kwargs): # noqa: E501 + def __call_123_test_special_tags( + self, + client_client, + **kwargs + ): """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 @@ -58,30 +62,34 @@ def __call_123_test_special_tags(self, client_client, **kwargs): # noqa: E501 >>> thread = api.call_123_test_special_tags(client_client, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param client.Client client_client: client model (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: client.Client - If the method is called asynchronously, returns the request - thread. + Args: + client_client (client.Client): client model + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + client.Client + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False 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 index 58b7c22e5e92..3369688cb88e 100644 --- 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 @@ -49,7 +49,10 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __foo_get(self, **kwargs): # noqa: E501 + def __foo_get( + self, + **kwargs + ): """foo_get # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -57,29 +60,32 @@ def __foo_get(self, **kwargs): # noqa: E501 >>> thread = api.foo_get(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: inline_response_default.InlineResponseDefault - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + inline_response_default.InlineResponseDefault + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False 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 index c967e92c76e1..ad882a19c661 100644 --- 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 @@ -53,7 +53,10 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __fake_health_get(self, **kwargs): # noqa: E501 + def __fake_health_get( + self, + **kwargs + ): """Health check endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -61,29 +64,32 @@ def __fake_health_get(self, **kwargs): # noqa: E501 >>> thread = api.fake_health_get(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: health_check_result.HealthCheckResult - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + health_check_result.HealthCheckResult + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -150,7 +156,10 @@ def __fake_health_get(self, **kwargs): # noqa: E501 callable=__fake_health_get ) - def __fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_boolean_serialize( + self, + **kwargs + ): """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 @@ -159,30 +168,33 @@ def __fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_boolean_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param bool body: Input boolean as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: bool - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (bool): Input boolean as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + bool + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -255,7 +267,10 @@ def __fake_outer_boolean_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_boolean_serialize ) - def __fake_outer_composite_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_composite_serialize( + self, + **kwargs + ): """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 @@ -264,30 +279,33 @@ def __fake_outer_composite_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_composite_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param outer_composite.OuterComposite outer_composite_outer_composite: Input composite as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: outer_composite.OuterComposite - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + outer_composite_outer_composite (outer_composite.OuterComposite): Input composite as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + outer_composite.OuterComposite + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -360,7 +378,10 @@ def __fake_outer_composite_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_composite_serialize ) - def __fake_outer_number_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_number_serialize( + self, + **kwargs + ): """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 @@ -369,30 +390,33 @@ def __fake_outer_number_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_number_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param float body: Input number as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: float - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (float): Input number as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + float + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -465,7 +489,10 @@ def __fake_outer_number_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_number_serialize ) - def __fake_outer_string_serialize(self, **kwargs): # noqa: E501 + def __fake_outer_string_serialize( + self, + **kwargs + ): """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 @@ -474,30 +501,33 @@ def __fake_outer_string_serialize(self, **kwargs): # noqa: E501 >>> thread = api.fake_outer_string_serialize(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str body: Input string as post body - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: str - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + body (str): Input string as post body. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -570,7 +600,11 @@ def __fake_outer_string_serialize(self, **kwargs): # noqa: E501 callable=__fake_outer_string_serialize ) - def __test_body_with_file_schema(self, file_schema_test_class_file_schema_test_class, **kwargs): # noqa: E501 + def __test_body_with_file_schema( + self, + file_schema_test_class_file_schema_test_class, + **kwargs + ): """test_body_with_file_schema # noqa: E501 For this test, the body for this request much reference a schema named `File`. # noqa: E501 @@ -579,30 +613,34 @@ def __test_body_with_file_schema(self, file_schema_test_class_file_schema_test_c >>> thread = api.test_body_with_file_schema(file_schema_test_class_file_schema_test_class, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param file_schema_test_class.FileSchemaTestClass file_schema_test_class_file_schema_test_class: (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + file_schema_test_class_file_schema_test_class (file_schema_test_class.FileSchemaTestClass): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -677,7 +715,12 @@ def __test_body_with_file_schema(self, file_schema_test_class_file_schema_test_c callable=__test_body_with_file_schema ) - def __test_body_with_query_params(self, query, user_user, **kwargs): # noqa: E501 + def __test_body_with_query_params( + self, + query, + user_user, + **kwargs + ): """test_body_with_query_params # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -685,31 +728,35 @@ def __test_body_with_query_params(self, query, user_user, **kwargs): # noqa: E5 >>> thread = api.test_body_with_query_params(query, user_user, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str query: (required) - :param user.User user_user: (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + query (str): + user_user (user.User): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -792,7 +839,11 @@ def __test_body_with_query_params(self, query, user_user, **kwargs): # noqa: E5 callable=__test_body_with_query_params ) - def __test_client_model(self, client_client, **kwargs): # noqa: E501 + def __test_client_model( + self, + client_client, + **kwargs + ): """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 @@ -801,30 +852,34 @@ def __test_client_model(self, client_client, **kwargs): # noqa: E501 >>> thread = api.test_client_model(client_client, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param client.Client client_client: client model (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: client.Client - If the method is called asynchronously, returns the request - thread. + Args: + client_client (client.Client): client model + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + client.Client + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -901,7 +956,14 @@ def __test_client_model(self, client_client, **kwargs): # noqa: E501 callable=__test_client_model ) - def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 + def __test_endpoint_parameters( + self, + number, + double, + pattern_without_delimiter, + byte, + **kwargs + ): """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -910,43 +972,47 @@ def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param float number: None (required) - :param float double: None (required) - :param str pattern_without_delimiter: None (required) - :param str byte: None (required) - :param int integer: None - :param int int32: None - :param int int64: None - :param float float: None - :param str string: None - :param file_type binary: None - :param date date: None - :param datetime date_time: None - :param str password: None - :param str param_callback: None - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + number (float): None + double (float): None + pattern_without_delimiter (str): None + byte (str): None + + Keyword Args: + integer (int): None. [optional] + int32 (int): None. [optional] + int64 (int): None. [optional] + float (float): None. [optional] + string (str): None. [optional] + binary (file_type): None. [optional] + date (date): None. [optional] + date_time (datetime): None. [optional] + password (str): None. [optional] + param_callback (str): None. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1147,7 +1213,10 @@ def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, callable=__test_endpoint_parameters ) - def __test_enum_parameters(self, **kwargs): # noqa: E501 + def __test_enum_parameters( + self, + **kwargs + ): """To test enum parameters # noqa: E501 To test enum parameters # noqa: E501 @@ -1156,37 +1225,40 @@ def __test_enum_parameters(self, **kwargs): # noqa: E501 >>> thread = api.test_enum_parameters(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] enum_header_string_array: Header parameter enum test (string array) - :param str enum_header_string: Header parameter enum test (string) - :param [str] enum_query_string_array: Query parameter enum test (string array) - :param str enum_query_string: Query parameter enum test (string) - :param int enum_query_integer: Query parameter enum test (double) - :param float enum_query_double: Query parameter enum test (double) - :param [str] enum_form_string_array: Form parameter enum test (string array) - :param str enum_form_string: Form parameter enum test (string) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + enum_header_string_array ([str]): Header parameter enum test (string array). [optional] + enum_header_string (str): Header parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' + enum_query_string_array ([str]): Query parameter enum test (string array). [optional] + enum_query_string (str): Query parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' + enum_query_integer (int): Query parameter enum test (double). [optional] + enum_query_double (float): Query parameter enum test (double). [optional] + enum_form_string_array ([str]): Form parameter enum test (string array). [optional] if omitted the server will use the default value of '$' + enum_form_string (str): Form parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1347,7 +1419,13 @@ def __test_enum_parameters(self, **kwargs): # noqa: E501 callable=__test_enum_parameters ) - def __test_group_parameters(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501 + def __test_group_parameters( + self, + required_string_group, + required_boolean_group, + required_int64_group, + **kwargs + ): """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 @@ -1356,35 +1434,39 @@ def __test_group_parameters(self, required_string_group, required_boolean_group, >>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int required_string_group: Required String in group parameters (required) - :param bool required_boolean_group: Required Boolean in group parameters (required) - :param int required_int64_group: Required Integer in group parameters (required) - :param int string_group: String in group parameters - :param bool boolean_group: Boolean in group parameters - :param int int64_group: Integer in group parameters - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + required_string_group (int): Required String in group parameters + required_boolean_group (bool): Required Boolean in group parameters + required_int64_group (int): Required Integer in group parameters + + Keyword Args: + string_group (int): String in group parameters. [optional] + boolean_group (bool): Boolean in group parameters. [optional] + int64_group (int): Integer in group parameters. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1491,7 +1573,11 @@ def __test_group_parameters(self, required_string_group, required_boolean_group, callable=__test_group_parameters ) - def __test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 + def __test_inline_additional_properties( + self, + request_body, + **kwargs + ): """test inline additionalProperties # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1499,30 +1585,34 @@ def __test_inline_additional_properties(self, request_body, **kwargs): # noqa: >>> thread = api.test_inline_additional_properties(request_body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param {str: (str,)} request_body: request body (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + request_body ({str: (str,)}): request body + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1597,7 +1687,12 @@ def __test_inline_additional_properties(self, request_body, **kwargs): # noqa: callable=__test_inline_additional_properties ) - def __test_json_form_data(self, param, param2, **kwargs): # noqa: E501 + def __test_json_form_data( + self, + param, + param2, + **kwargs + ): """test json serialization of form data # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1605,31 +1700,35 @@ def __test_json_form_data(self, param, param2, **kwargs): # noqa: E501 >>> thread = api.test_json_form_data(param, param2, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str param: field1 (required) - :param str param2: field2 (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + param (str): field1 + param2 (str): field2 + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -1713,7 +1812,15 @@ def __test_json_form_data(self, param, param2, **kwargs): # noqa: E501 callable=__test_json_form_data ) - def __test_query_parameter_collection_format(self, pipe, ioutil, http, url, context, **kwargs): # noqa: E501 + def __test_query_parameter_collection_format( + self, + pipe, + ioutil, + http, + url, + context, + **kwargs + ): """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 @@ -1722,34 +1829,38 @@ def __test_query_parameter_collection_format(self, pipe, ioutil, http, url, cont >>> thread = api.test_query_parameter_collection_format(pipe, ioutil, http, url, context, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] pipe: (required) - :param [str] ioutil: (required) - :param [str] http: (required) - :param [str] url: (required) - :param [str] context: (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pipe ([str]): + ioutil ([str]): + http ([str]): + url ([str]): + context ([str]): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False 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 index 90da061d2d9a..ec0225f1d1cd 100644 --- 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 @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __test_classname(self, client_client, **kwargs): # noqa: E501 + def __test_classname( + self, + client_client, + **kwargs + ): """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 @@ -58,30 +62,34 @@ def __test_classname(self, client_client, **kwargs): # noqa: E501 >>> thread = api.test_classname(client_client, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param client.Client client_client: client model (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: client.Client - If the method is called asynchronously, returns the request - thread. + Args: + client_client (client.Client): client model + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + client.Client + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False 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 index 53f199f9a896..0a0849dfb952 100644 --- 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 @@ -50,7 +50,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __add_pet(self, pet_pet, **kwargs): # noqa: E501 + def __add_pet( + self, + pet_pet, + **kwargs + ): """Add a new pet to the store # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -58,30 +62,34 @@ def __add_pet(self, pet_pet, **kwargs): # noqa: E501 >>> thread = api.add_pet(pet_pet, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param pet.Pet pet_pet: Pet object that needs to be added to the store (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pet_pet (pet.Pet): Pet object that needs to be added to the store + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -163,7 +171,11 @@ def __add_pet(self, pet_pet, **kwargs): # noqa: E501 callable=__add_pet ) - def __delete_pet(self, pet_id, **kwargs): # noqa: E501 + def __delete_pet( + self, + pet_id, + **kwargs + ): """Deletes a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -171,31 +183,35 @@ def __delete_pet(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.delete_pet(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: Pet id to delete (required) - :param str api_key: - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): Pet id to delete + + Keyword Args: + api_key (str): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -276,7 +292,11 @@ def __delete_pet(self, pet_id, **kwargs): # noqa: E501 callable=__delete_pet ) - def __find_pets_by_status(self, status, **kwargs): # noqa: E501 + def __find_pets_by_status( + self, + status, + **kwargs + ): """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 @@ -285,30 +305,34 @@ def __find_pets_by_status(self, status, **kwargs): # noqa: E501 >>> thread = api.find_pets_by_status(status, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] status: Status values that need to be considered for filter (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: [pet.Pet] - If the method is called asynchronously, returns the request - thread. + Args: + status ([str]): Status values that need to be considered for filter + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + [pet.Pet] + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -396,7 +420,11 @@ def __find_pets_by_status(self, status, **kwargs): # noqa: E501 callable=__find_pets_by_status ) - def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 + def __find_pets_by_tags( + self, + tags, + **kwargs + ): """Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 @@ -405,30 +433,34 @@ def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 >>> thread = api.find_pets_by_tags(tags, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [str] tags: Tags to filter by (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: [pet.Pet] - If the method is called asynchronously, returns the request - thread. + Args: + tags ([str]): Tags to filter by + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + [pet.Pet] + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -509,7 +541,11 @@ def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 callable=__find_pets_by_tags ) - def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 + def __get_pet_by_id( + self, + pet_id, + **kwargs + ): """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 @@ -518,30 +554,34 @@ def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.get_pet_by_id(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet to return (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: pet.Pet - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet to return + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + pet.Pet + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -620,7 +660,11 @@ def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 callable=__get_pet_by_id ) - def __update_pet(self, pet_pet, **kwargs): # noqa: E501 + def __update_pet( + self, + pet_pet, + **kwargs + ): """Update an existing pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -628,30 +672,34 @@ def __update_pet(self, pet_pet, **kwargs): # noqa: E501 >>> thread = api.update_pet(pet_pet, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param pet.Pet pet_pet: Pet object that needs to be added to the store (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pet_pet (pet.Pet): Pet object that needs to be added to the store + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -733,7 +781,11 @@ def __update_pet(self, pet_pet, **kwargs): # noqa: E501 callable=__update_pet ) - def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 + def __update_pet_with_form( + self, + pet_id, + **kwargs + ): """Updates a pet in the store with form data # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -741,32 +793,36 @@ def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.update_pet_with_form(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet that needs to be updated (required) - :param str name: Updated name of the pet - :param str status: Updated status of the pet - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet that needs to be updated + + Keyword Args: + name (str): Updated name of the pet. [optional] + status (str): Updated status of the pet. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -854,7 +910,11 @@ def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 callable=__update_pet_with_form ) - def __upload_file(self, pet_id, **kwargs): # noqa: E501 + def __upload_file( + self, + pet_id, + **kwargs + ): """uploads an image # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -862,32 +922,36 @@ def __upload_file(self, pet_id, **kwargs): # noqa: E501 >>> thread = api.upload_file(pet_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet to update (required) - :param str additional_metadata: Additional data to pass to server - :param file_type file: file to upload - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: api_response.ApiResponse - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet to update + + Keyword Args: + additional_metadata (str): Additional data to pass to server. [optional] + file (file_type): file to upload. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + api_response.ApiResponse + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -977,7 +1041,12 @@ def __upload_file(self, pet_id, **kwargs): # noqa: E501 callable=__upload_file ) - def __upload_file_with_required_file(self, pet_id, required_file, **kwargs): # noqa: E501 + def __upload_file_with_required_file( + self, + pet_id, + required_file, + **kwargs + ): """uploads an image (required) # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -985,32 +1054,36 @@ def __upload_file_with_required_file(self, pet_id, required_file, **kwargs): # >>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int pet_id: ID of pet to update (required) - :param file_type required_file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: api_response.ApiResponse - If the method is called asynchronously, returns the request - thread. + Args: + pet_id (int): ID of pet to update + required_file (file_type): file to upload + + Keyword Args: + additional_metadata (str): Additional data to pass to server. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + api_response.ApiResponse + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False 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 index c45745f3e529..36fd9bd722c0 100644 --- 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 @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __delete_order(self, order_id, **kwargs): # noqa: E501 + def __delete_order( + self, + order_id, + **kwargs + ): """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 @@ -58,30 +62,34 @@ def __delete_order(self, order_id, **kwargs): # noqa: E501 >>> thread = api.delete_order(order_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str order_id: ID of the order that needs to be deleted (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + order_id (str): ID of the order that needs to be deleted + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -155,7 +163,10 @@ def __delete_order(self, order_id, **kwargs): # noqa: E501 callable=__delete_order ) - def __get_inventory(self, **kwargs): # noqa: E501 + def __get_inventory( + self, + **kwargs + ): """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 @@ -164,29 +175,32 @@ def __get_inventory(self, **kwargs): # noqa: E501 >>> thread = api.get_inventory(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: {str: (int,)} - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + {str: (int,)} + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -255,7 +269,11 @@ def __get_inventory(self, **kwargs): # noqa: E501 callable=__get_inventory ) - def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 + def __get_order_by_id( + self, + order_id, + **kwargs + ): """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 @@ -264,30 +282,34 @@ def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 >>> thread = api.get_order_by_id(order_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param int order_id: ID of pet that needs to be fetched (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: order.Order - If the method is called asynchronously, returns the request - thread. + Args: + order_id (int): ID of pet that needs to be fetched + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + order.Order + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -370,7 +392,11 @@ def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 callable=__get_order_by_id ) - def __place_order(self, order_order, **kwargs): # noqa: E501 + def __place_order( + self, + order_order, + **kwargs + ): """Place an order for a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -378,30 +404,34 @@ def __place_order(self, order_order, **kwargs): # noqa: E501 >>> thread = api.place_order(order_order, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param order.Order order_order: order placed for purchasing the pet (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: order.Order - If the method is called asynchronously, returns the request - thread. + Args: + order_order (order.Order): order placed for purchasing the pet + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + order.Order + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False 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 index 141520baa7e5..aeac99493615 100644 --- 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 @@ -49,7 +49,11 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def __create_user(self, user_user, **kwargs): # noqa: E501 + def __create_user( + self, + user_user, + **kwargs + ): """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -58,30 +62,34 @@ def __create_user(self, user_user, **kwargs): # noqa: E501 >>> thread = api.create_user(user_user, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param user.User user_user: Created user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + user_user (user.User): Created user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -156,7 +164,11 @@ def __create_user(self, user_user, **kwargs): # noqa: E501 callable=__create_user ) - def __create_users_with_array_input(self, user_user, **kwargs): # noqa: E501 + def __create_users_with_array_input( + self, + user_user, + **kwargs + ): """Creates list of users with given input array # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -164,30 +176,34 @@ def __create_users_with_array_input(self, user_user, **kwargs): # noqa: E501 >>> thread = api.create_users_with_array_input(user_user, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [user.User] user_user: List of user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + user_user ([user.User]): List of user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -262,7 +278,11 @@ def __create_users_with_array_input(self, user_user, **kwargs): # noqa: E501 callable=__create_users_with_array_input ) - def __create_users_with_list_input(self, user_user, **kwargs): # noqa: E501 + def __create_users_with_list_input( + self, + user_user, + **kwargs + ): """Creates list of users with given input array # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -270,30 +290,34 @@ def __create_users_with_list_input(self, user_user, **kwargs): # noqa: E501 >>> thread = api.create_users_with_list_input(user_user, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param [user.User] user_user: List of user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + user_user ([user.User]): List of user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -368,7 +392,11 @@ def __create_users_with_list_input(self, user_user, **kwargs): # noqa: E501 callable=__create_users_with_list_input ) - def __delete_user(self, username, **kwargs): # noqa: E501 + def __delete_user( + self, + username, + **kwargs + ): """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -377,30 +405,34 @@ def __delete_user(self, username, **kwargs): # noqa: E501 >>> thread = api.delete_user(username, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: The name that needs to be deleted (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + username (str): The name that needs to be deleted + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -474,7 +506,11 @@ def __delete_user(self, username, **kwargs): # noqa: E501 callable=__delete_user ) - def __get_user_by_name(self, username, **kwargs): # noqa: E501 + def __get_user_by_name( + self, + username, + **kwargs + ): """Get user by user name # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -482,30 +518,34 @@ def __get_user_by_name(self, username, **kwargs): # noqa: E501 >>> thread = api.get_user_by_name(username, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: The name that needs to be fetched. Use user1 for testing. (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: user.User - If the method is called asynchronously, returns the request - thread. + Args: + username (str): The name that needs to be fetched. Use user1 for testing. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + user.User + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -582,7 +622,12 @@ def __get_user_by_name(self, username, **kwargs): # noqa: E501 callable=__get_user_by_name ) - def __login_user(self, username, password, **kwargs): # noqa: E501 + def __login_user( + self, + username, + password, + **kwargs + ): """Logs user into the system # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -590,31 +635,35 @@ def __login_user(self, username, password, **kwargs): # noqa: E501 >>> thread = api.login_user(username, password, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: The user name for login (required) - :param str password: The password for login in clear text (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: str - If the method is called asynchronously, returns the request - thread. + Args: + username (str): The user name for login + password (str): The password for login in clear text + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -699,7 +748,10 @@ def __login_user(self, username, password, **kwargs): # noqa: E501 callable=__login_user ) - def __logout_user(self, **kwargs): # noqa: E501 + def __logout_user( + self, + **kwargs + ): """Logs out current logged in user session # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -707,29 +759,32 @@ def __logout_user(self, **kwargs): # noqa: E501 >>> thread = api.logout_user(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False @@ -794,7 +849,12 @@ def __logout_user(self, **kwargs): # noqa: E501 callable=__logout_user ) - def __update_user(self, username, user_user, **kwargs): # noqa: E501 + def __update_user( + self, + username, + user_user, + **kwargs + ): """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 @@ -803,31 +863,35 @@ def __update_user(self, username, user_user, **kwargs): # noqa: E501 >>> thread = api.update_user(username, user_user, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - Default is False. - :param str username: name that need to be deleted (required) - :param user.User user_user: Updated user object (required) - :param _return_http_data_only: response data without head status - code and headers. Default is True. - :param _preload_content: if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - :param _request_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. - Default is None. - :param _check_input_type: boolean specifying if type checking - should be done one the data sent to the server. - Default is True. - :param _check_return_type: boolean specifying if type checking - should be done one the data received from the server. - Default is True. - :param _host_index: integer specifying the index of the server - that we want to use. - Default is 0. - :return: None - If the method is called asynchronously, returns the request - thread. + Args: + username (str): name that need to be deleted + user_user (user.User): Updated user object + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int): specifies the index of the server + that we want to use. + Default is 0. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False From 845acce4af92c50f170c3c76c9c3ea6d34dc53e3 Mon Sep 17 00:00:00 2001 From: Alexey Makhrov Date: Wed, 29 Jan 2020 23:47:09 -0800 Subject: [PATCH 23/72] Remove typeMapping for "List" from AbstractTypeScriptClientCodegen (#5160) --- .../codegen/languages/AbstractTypeScriptClientCodegen.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 0285772a69a0..5c3cd43e5a8b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -131,7 +131,6 @@ public AbstractTypeScriptClientCodegen() { typeMapping = new HashMap(); typeMapping.put("Array", "Array"); typeMapping.put("array", "Array"); - typeMapping.put("List", "Array"); typeMapping.put("boolean", "boolean"); typeMapping.put("string", "string"); typeMapping.put("int", "number"); From 97c8009ccbd01cb9360a5fda391a29ded422af09 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 30 Jan 2020 16:00:13 -0500 Subject: [PATCH 24/72] [gradle] Clarify defining multiple tasks (#5167) --- .../README.adoc | 25 ++++++++++++++++++- .../samples/local-spec/build.gradle | 10 ++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 0f97dfb55108..2b613ebfddf3 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -9,7 +9,6 @@ These map almost fully 1:1 with the options you'd pass to the CLI or Maven plugi Tasks are listed under the "OpenAPI Tools" tasks heading. - .OpenAPI Tools Tasks |=== |task name |description @@ -38,6 +37,30 @@ compileJava.dependsOn tasks.openApiGenerate ``` ==== +All extensions can be rewritten as tasks. Where you can have only a single extension defined in your gradle file, you may have multiple tasks. + +.One Extension, multiple tasks +[source,groovy] +---- +// Validating a single specification +openApiValidate { + inputSpec = "$rootDir/petstore-v3.0-invalid.yaml".toString() +} + +// Define a task for validating one specification +task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask){ + inputSpec = "$rootDir/petstore-v3.0.yaml".toString() +} + +// Define a task for validating another specification +task validateBadSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask){ + inputSpec = "$rootDir/petstore-v3.0-invalid.yaml".toString() +} + +// Define a task for batch validations +task validateSpecs(dependsOn: ['validateGoodSpec', 'validateBadSpec']) +---- + == Plugin Setup //# RELEASE_VERSION diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index 70d810a83cb5..c8c7e25dc0bb 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -91,3 +91,13 @@ task generateGoWithInvalidSpec(type: org.openapitools.generator.gradle.plugin.ta dateLibrary: "threetenp" ] } + +task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask){ + inputSpec = "$rootDir/petstore-v3.0.yaml".toString() +} + +task validateBadSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask){ + inputSpec = "$rootDir/petstore-v3.0-invalid.yaml".toString() +} + +task validateSpecs(dependsOn: ['validateGoodSpec', 'validateBadSpec']) From 49a9b61f515abe82c4b9c08eacd1857112a44530 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 30 Jan 2020 20:18:39 -0500 Subject: [PATCH 25/72] [gradle] Reorganize build repositories (#5168) --- modules/openapi-generator-gradle-plugin/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index d6886b217568..b35ecef36116 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -45,15 +45,15 @@ sourceCompatibility = 1.8 targetCompatibility = 1.8 repositories { - jcenter() - maven { url "https://repo1.maven.org/maven2" } mavenLocal() + maven { url "https://repo1.maven.org/maven2" } maven { url "https://oss.sonatype.org/content/repositories/releases/" } maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + jcenter() } dependencies { From f0d92bb0c1d2013fe7595d50166873face078e14 Mon Sep 17 00:00:00 2001 From: Alexey Makhrov Date: Thu, 30 Jan 2020 22:56:18 -0800 Subject: [PATCH 26/72] [typescript] Introduce "enumPropertyNaming" option (#5162) * Add enumPropertyNaming option to typescript generators * Regenerate docs * Add Locale.ROOT to toUpperCase() call * Use actual enum values in an error message, instead of hardcoding them * Add tests for "UPPERCASE" and "snake_case" enum var namings * Add LOCALE.ROOT to String#format call --- docs/generators/javascript-flowtyped.md | 1 + docs/generators/typescript-angular.md | 1 + docs/generators/typescript-angularjs.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-node.md | 1 + docs/generators/typescript-redux-query.md | 1 + docs/generators/typescript-rxjs.md | 1 + .../AbstractTypeScriptClientCodegen.java | 51 ++++++++++++++++--- ...ypeScriptAngularClientOptionsProvider.java | 2 + ...eScriptAngularJsClientOptionsProvider.java | 2 + ...ypeScriptAureliaClientOptionsProvider.java | 2 + .../TypeScriptFetchClientOptionsProvider.java | 2 + .../TypeScriptNodeClientOptionsProvider.java | 2 + .../TypeScriptAngularClientCodegenTest.java | 29 ++++++++++- 18 files changed, 94 insertions(+), 7 deletions(-) diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 0946f5191209..9c354db86bbe 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -7,6 +7,7 @@ sidebar_label: javascript-flowtyped | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index cb9160d26ace..5324f24baa67 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -8,6 +8,7 @@ sidebar_label: typescript-angular |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiModulePrefix|The prefix of the generated ApiModule.| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 932d469935b9..09beb233b1c5 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -7,6 +7,7 @@ sidebar_label: typescript-angularjs | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: '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| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 6f65c5174f65..8028d707794e 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -7,6 +7,7 @@ sidebar_label: typescript-aurelia | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 7df54bceb8f5..29f419bb8382 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -7,6 +7,7 @@ sidebar_label: typescript-axios | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 98a52b89d78a..c319cec9c199 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -7,6 +7,7 @@ sidebar_label: typescript-fetch | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index c3bf2d710faf..68a4f9c65aea 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -7,6 +7,7 @@ sidebar_label: typescript-inversify | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 07d320ffe87a..0ac83747079f 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -7,6 +7,7 @@ sidebar_label: typescript-jquery | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 331905fd5c9c..b35794784faa 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -7,6 +7,7 @@ sidebar_label: typescript-node | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 1bdb95c142f1..db2f20c3e079 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -7,6 +7,7 @@ sidebar_label: typescript-redux-query | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 0516372fef8a..90c85bbf1435 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -7,6 +7,7 @@ sidebar_label: typescript-rxjs | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 5c3cd43e5a8b..3db985cb8c53 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; @@ -36,6 +37,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -54,6 +56,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp protected static final ThreadLocal SNAPSHOT_SUFFIX_FORMAT = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMddHHmm", Locale.ROOT)); protected String modelPropertyNaming = "camelCase"; + protected ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = ENUM_PROPERTY_NAMING_TYPE.PascalCase; protected Boolean supportsES6 = false; protected HashSet languageGenericTypes; protected String npmName = null; @@ -153,6 +156,7 @@ public AbstractTypeScriptClientCodegen() { typeMapping.put("URI", "string"); typeMapping.put("Error", "Error"); + cliOptions.add(new CliOption(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_DESC).defaultValue(this.enumPropertyNaming.name())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue(this.modelPropertyNaming)); cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue(String.valueOf(this.getSupportsES6()))); this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package." + @@ -175,6 +179,10 @@ public void processOpts() { LOGGER.info("Warning: Environment variable 'TS_POST_PROCESS_FILE' is set but file post-processing is not enabled. To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); } + if (additionalProperties.containsKey(CodegenConstants.ENUM_PROPERTY_NAMING)) { + setEnumPropertyNaming((String) additionalProperties.get(CodegenConstants.ENUM_PROPERTY_NAMING)); + } + if (additionalProperties.containsKey(CodegenConstants.MODEL_PROPERTY_NAMING)) { setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING)); } @@ -187,7 +195,6 @@ public void processOpts() { if (additionalProperties.containsKey(NPM_NAME)) { this.setNpmName(additionalProperties.get(NPM_NAME).toString()); } - } @Override @@ -543,12 +550,12 @@ public String toEnumDefaultValue(String value, String datatype) { @Override public String toEnumVarName(String name, String datatype) { if (name.length() == 0) { - return "Empty"; + return getNameUsingEnumPropertyNaming("empty"); } // for symbol, e.g. $, # if (getSymbolName(name) != null) { - return camelize(getSymbolName(name)); + return getNameUsingEnumPropertyNaming(getSymbolName(name)); } // number @@ -566,9 +573,7 @@ public String toEnumVarName(String name, String datatype) { enumName = enumName.replaceFirst("^_", ""); enumName = enumName.replaceFirst("_$", ""); - // camelize the enum variable name - // ref: https://basarat.gitbooks.io/typescript/content/docs/enums.html - enumName = camelize(enumName); + enumName = getNameUsingEnumPropertyNaming(enumName); if (enumName.matches("\\d.*")) { // starts with number return "_" + enumName; @@ -587,6 +592,40 @@ public String toEnumName(CodegenProperty property) { } } + protected void setEnumPropertyNaming(String naming) { + try { + enumPropertyNaming = ENUM_PROPERTY_NAMING_TYPE.valueOf(naming); + } catch (IllegalArgumentException e) { + String values = Stream.of(ENUM_PROPERTY_NAMING_TYPE.values()) + .map(value -> "'" + value.name() + "'") + .collect(Collectors.joining(", ")); + + String msg = String.format(Locale.ROOT, "Invalid enum property naming '%s'. Must be one of %s.",naming, values); + throw new IllegalArgumentException(msg); + } + } + + protected ENUM_PROPERTY_NAMING_TYPE getEnumPropertyNaming() { + return enumPropertyNaming; + } + + private String getNameUsingEnumPropertyNaming(String name) { + switch (getEnumPropertyNaming()) { + case original: + return name; + case camelCase: + return camelize(name, true); + case PascalCase: + return camelize(name); + case snake_case: + return underscore(name); + case UPPERCASE: + return name.toUpperCase(Locale.ROOT); + default: + throw new IllegalArgumentException("Unsupported enum property naming: '" + name); + } + } + @Override protected void addImport(CodegenModel m, String type) { if (type == null) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index 3f2a7fe73059..1aaf04f213fe 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -29,6 +29,7 @@ public class TypeScriptAngularClientOptionsProvider implements OptionsProvider { 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 ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; private static final String NMP_NAME = "npmName"; private static final String NMP_VERSION = "1.1.2"; @@ -54,6 +55,7 @@ public Map createOptions() { 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.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.SUPPORTS_ES6, SUPPORTS_ES6_VALUE) .put(TypeScriptAngularClientCodegen.STRING_ENUMS, STRING_ENUMS_VALUE) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java index a683e654f5b0..8c6f9efde044 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java @@ -28,6 +28,7 @@ public class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider 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 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"; @@ -43,6 +44,7 @@ public Map createOptions() { .put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, SORT_MODEL_PROPERTIES_VALUE) .put(CodegenConstants.SUPPORTS_ES6, SUPPORTS_ES6_VALUE) .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.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index d117acce285b..1105fa14a45d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -28,6 +28,7 @@ public class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; public static final Boolean SUPPORTS_ES6_VALUE = false; + public static final String ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; private static final String NPM_NAME = "npmName"; private static final String NPM_VERSION = "1.0.0"; @@ -45,6 +46,7 @@ public Map createOptions() { 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.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.SUPPORTS_ES6, String.valueOf(SUPPORTS_ES6_VALUE)) .put(TypeScriptAureliaClientCodegen.NPM_NAME, NPM_NAME) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 4b672179f49a..6bf1bb7b0822 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -29,6 +29,7 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider { public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; public static final Boolean SUPPORTS_ES6_VALUE = false; public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; + public static final String ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; private static final String NMP_NAME = "npmName"; private static final String NMP_VERSION = "1.0.0"; private static final String NPM_REPOSITORY = "https://registry.npmjs.org"; @@ -47,6 +48,7 @@ public Map createOptions() { 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.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.SUPPORTS_ES6, String.valueOf(SUPPORTS_ES6_VALUE)) .put(TypeScriptFetchClientCodegen.NPM_NAME, NMP_NAME) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java index 5e38ada840d4..c46fea54e3c4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java @@ -30,6 +30,7 @@ public class TypeScriptNodeClientOptionsProvider implements OptionsProvider { 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 ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; public static final String NMP_NAME = "npmName"; public static final String NMP_VERSION = "1.1.2"; public static final String NPM_REPOSITORY = "https://registry.npmjs.org"; @@ -49,6 +50,7 @@ public Map createOptions() { .put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, SORT_MODEL_PROPERTIES_VALUE) .put(CodegenConstants.SUPPORTS_ES6, SUPPORTS_ES6_VALUE) .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(TypeScriptAngularClientCodegen.NPM_NAME, NMP_NAME) .put(TypeScriptAngularClientCodegen.NPM_VERSION, NMP_VERSION) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java index 394ddc72e4e2..6a538c692739 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java @@ -8,6 +8,7 @@ import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.responses.ApiResponses; +import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptAngularClientCodegen; @@ -16,6 +17,33 @@ public class TypeScriptAngularClientCodegenTest { + @Test + public void toEnumVarName() { + TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen(); + // unspecified option should default to PascalCase + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumVarName("valid_id", "string"), "ValidId"); + Assert.assertEquals(codegen.toEnumVarName("illegal-id+", "string"), "IllegalId"); + + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.original.name()); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumVarName("valid_id", "string"), "valid_id"); + Assert.assertEquals(codegen.toEnumVarName("illegal-id+", "string"), "illegal_id"); + + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.UPPERCASE.name()); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumVarName("valid_id", "string"), "VALID_ID"); + Assert.assertEquals(codegen.toEnumVarName("illegal-id+", "string"), "ILLEGAL_ID"); + + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.snake_case.name()); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumVarName("valid_ID", "string"), "valid_id"); + Assert.assertEquals(codegen.toEnumVarName("Illegal-Id+", "string"), "illegal_id"); + } + @Test public void testModelSuffix() { TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen(); @@ -161,6 +189,5 @@ public void testKebabCasedModelFilenames() { Assert.assertEquals(codegen.toModelImport(modelName), "model/foo-response-links"); Assert.assertEquals(codegen.toModelFilename(modelName), "./foo-response-links"); - } } From 26ace1337d42638e2f3c3727d3438666a6886b31 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 31 Jan 2020 16:24:06 +0800 Subject: [PATCH 27/72] Prepare 4.2.3 release (#5172) * release 4.2.3 * update readme --- README.md | 13 ++++++------- modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- modules/openapi-generator-gradle-plugin/README.adoc | 2 +- .../gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- .../samples/local-spec/README.md | 2 +- modules/openapi-generator-maven-plugin/README.md | 2 +- .../examples/java-client.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- .../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/meta-codegen/lib/pom.xml | 2 +- 17 files changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 86a0f282887b..0b596ea07df5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.3-SNAPSHOT`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.3`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/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-wh2wu) @@ -114,8 +114,7 @@ OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) 4.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.3.0-SNAPSHOT/)| 29.02.2020 | Minor release (breaking changes with fallbacks) -4.2.3-SNAPSHOT (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.2.3-SNAPSHOT/)| 31.01.2020 | Patch release -[4.2.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.2) (latest stable release) | 02.12.2019 | Patch release +[4.2.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.3) (latest stable release) | 31.01.2019 | Patch release OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -171,16 +170,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/4.2.2/openapi-generator-cli-4.2.2.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar` For **Mac/Linux** users: ```sh -wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.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/4.2.2/openapi-generator-cli-4.2.2.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -428,7 +427,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/2_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/4.2.2/openapi-generator-cli-4.2.2.jar) +You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index 940242562ec1..4ff3511f8d08 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.2.3-SNAPSHOT + 4.2.3 ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index c0b948f98492..54e87c5e0e3f 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 4.2.3-SNAPSHOT + 4.2.3 ../.. diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 2b613ebfddf3..e107d0956f91 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -68,7 +68,7 @@ task validateSpecs(dependsOn: ['validateGoodSpec', 'validateBadSpec']) [source,group] ---- plugins { - id "org.openapi.generator" version "4.2.3-SNAPSHOT" + id "org.openapi.generator" version "4.2.3" } ---- diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index bf9cf796c229..122afc6aa9c7 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=4.2.3-SNAPSHOT +openApiGeneratorVersion=4.2.3 # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 3faf989a6bb2..7fd73323e153 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 - 4.2.3-SNAPSHOT + 4.2.3 ../.. diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index 23270faca3ca..c537147edf7a 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -18,5 +18,5 @@ gradle generateGoWithInvalidSpec The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=4.2.3-SNAPSHOT openApiValidate +gradle -PopenApiGeneratorVersion=4.2.3 openApiValidate ``` diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index fd6c8e25ca99..9714ace95f9d 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -12,7 +12,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 4.2.3-SNAPSHOT + 4.2.3 diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index bc5e8d7f3b28..b2af9a9693c9 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 - 4.2.3-SNAPSHOT + 4.2.3 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 643bf333ddff..b2411ecc54bc 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 - 4.2.3-SNAPSHOT + 4.2.3 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 e05fd2eef0b3..bfea21b8f87a 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 - 4.2.3-SNAPSHOT + 4.2.3 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 469d1eb1c782..e41f65451bf5 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 - 4.2.3-SNAPSHOT + 4.2.3 diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 84844cc99c1b..a2d8c2e51406 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 - 4.2.3-SNAPSHOT + 4.2.3 ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index bba07959468d..3db077364e4b 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.2.3-SNAPSHOT + 4.2.3 ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index dea98573b944..d46aa9a7ec53 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 4.2.3-SNAPSHOT + 4.2.3 ../.. diff --git a/pom.xml b/pom.xml index 721f86d042cf..ae0add21af0a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom openapi-generator-project - 4.2.3-SNAPSHOT + 4.2.3 https://github.com/openapitools/openapi-generator diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index ae44d802a0eb..96e112315c94 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 4.2.3-SNAPSHOT + 4.2.3 1.0.0 4.8.1 From e90b1817b56856884197cc91c688659be9add6e1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 31 Jan 2020 19:01:44 +0800 Subject: [PATCH 28/72] update readme --- README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0b596ea07df5..9246e7ca297f 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,13 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.2.3`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.3.0`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/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-wh2wu) [![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator) [![iOS Build Status](https://app.bitrise.io/app/4a2b10a819d12b67/status.svg?token=859FMDR8QHwabCzwvZK6vQ&branch=master)](https://app.bitrise.io/app/4a2b10a819d12b67) -[`4.3.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.3.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/4.3.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) -[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/4.3.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) -[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=4.3.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) -[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=4.3.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) -[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/4.3.x)](https://cloud.drone.io/OpenAPITools/openapi-generator) -[![iOS Build Status](https://app.bitrise.io/app/4a2b10a819d12b67/status.svg?token=859FMDR8QHwabCzwvZK6vQ&branch=4.3.x)](https://app.bitrise.io/app/4a2b10a819d12b67) - [`5.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/5.0.x) branch: [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/5.0.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/5.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=5.0.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) @@ -114,7 +107,7 @@ OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback) 4.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.3.0-SNAPSHOT/)| 29.02.2020 | Minor release (breaking changes with fallbacks) -[4.2.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.3) (latest stable release) | 31.01.2019 | Patch release +[4.2.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.3) (latest stable release) | 31.01.2019 | Backward-compatible release OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 From 92739a967aba0e2d20d68464d54f7c9684c0a08c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 31 Jan 2020 19:16:03 +0800 Subject: [PATCH 29/72] update samples --- .../go-experimental/go-petstore/.openapi-generator/VERSION | 2 +- .../petstore/python-experimental/.openapi-generator/VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ 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 58592f031f65..bfbf77eb7fad 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file From e32a2f012135c394a128051c2e220fd3b9b2936c Mon Sep 17 00:00:00 2001 From: Alexey Makhrov Date: Fri, 31 Jan 2020 03:17:22 -0800 Subject: [PATCH 30/72] [typescript] Append enum suffix without model suffix (#5138) * [typescript] Generate enum name independently on model name, ignoring modelSuffix * Add `enumSufix` cli option for all typescript generators * Add ENUM_NAME_SUFFIX to to TypeScript***ClientOptionsProvider * Add a typeMapping for OAS2 built-in "file" type * Re-generate samples * Introduce `v4-compat` mode for enumNamePrefix * Update TypeScriptFetchModelTest - make sure codegen options are processed before running assertions * Regenerate samples * Regenerate docs * Regenerate docs --- docs/generators/javascript-flowtyped.md | 1 + docs/generators/typescript-angular.md | 1 + docs/generators/typescript-angularjs.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-node.md | 1 + docs/generators/typescript-redux-query.md | 1 + docs/generators/typescript-rxjs.md | 1 + .../AbstractTypeScriptClientCodegen.java | 67 +++++++++++++------ .../TypeScriptAngularClientCodegen.java | 23 +++++-- ...ypeScriptAngularClientOptionsProvider.java | 2 + ...eScriptAngularJsClientOptionsProvider.java | 2 + ...ypeScriptAureliaClientOptionsProvider.java | 2 + .../TypeScriptFetchClientOptionsProvider.java | 2 + .../TypeScriptNodeClientOptionsProvider.java | 2 + .../fetch/TypeScriptFetchModelTest.java | 2 + .../TypeScriptAngularClientCodegenTest.java | 52 ++++++++++++++ 20 files changed, 141 insertions(+), 24 deletions(-) diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 9c354db86bbe..8cf943fa3170 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -7,6 +7,7 @@ sidebar_label: javascript-flowtyped | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 5324f24baa67..13c700448a0d 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -8,6 +8,7 @@ sidebar_label: typescript-angular |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiModulePrefix|The prefix of the generated ApiModule.| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 09beb233b1c5..ac3aaf63d600 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -7,6 +7,7 @@ sidebar_label: typescript-angularjs | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: '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| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 8028d707794e..7f934105a894 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -7,6 +7,7 @@ sidebar_label: typescript-aurelia | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 29f419bb8382..f34971518b6f 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -7,6 +7,7 @@ sidebar_label: typescript-axios | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index c319cec9c199..695c85c033e5 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -7,6 +7,7 @@ sidebar_label: typescript-fetch | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 68a4f9c65aea..62170b6117cf 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -7,6 +7,7 @@ sidebar_label: typescript-inversify | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 0ac83747079f..8a00cf0d97be 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -7,6 +7,7 @@ sidebar_label: typescript-jquery | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index b35794784faa..7baeb9240142 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -7,6 +7,7 @@ sidebar_label: typescript-node | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index db2f20c3e079..e888c68f49f9 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -7,6 +7,7 @@ sidebar_label: typescript-redux-query | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 90c85bbf1435..41811e3d1ffb 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -7,6 +7,7 @@ sidebar_label: typescript-rxjs | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumNameSuffix|Suffix that will be appended to all enum names. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 3db985cb8c53..75a7c18c7831 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -51,6 +51,11 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp public static final String NPM_VERSION = "npmVersion"; public static final String SNAPSHOT = "snapshot"; + public static final String ENUM_NAME_SUFFIX_V4_COMPAT = "v4-compat"; + public static final String ENUM_NAME_SUFFIX_DESC_CUSTOMIZED = CodegenConstants.ENUM_NAME_SUFFIX_DESC + + " A special '" + ENUM_NAME_SUFFIX_V4_COMPAT + "' value enables the backward-compatible behavior (as pre v4.2.3)"; + + // NOTE: SimpleDateFormat is not thread-safe and may not be static unless it is thread-local @SuppressWarnings("squid:S5164") protected static final ThreadLocal SNAPSHOT_SUFFIX_FORMAT = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMddHHmm", Locale.ROOT)); @@ -62,7 +67,9 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp protected String npmName = null; protected String npmVersion = "1.0.0"; - protected String enumSuffix = "Enum"; + protected String enumSuffix = ENUM_NAME_SUFFIX_V4_COMPAT; + protected Boolean isEnumSuffixV4Compat = false; + protected String classEnumSeparator = "."; public AbstractTypeScriptClientCodegen() { @@ -151,11 +158,13 @@ public AbstractTypeScriptClientCodegen() { typeMapping.put("DateTime", "Date"); typeMapping.put("binary", "any"); typeMapping.put("File", "any"); + typeMapping.put("file", "any"); typeMapping.put("ByteArray", "string"); typeMapping.put("UUID", "string"); typeMapping.put("URI", "string"); typeMapping.put("Error", "Error"); + cliOptions.add(new CliOption(CodegenConstants.ENUM_NAME_SUFFIX, ENUM_NAME_SUFFIX_DESC_CUSTOMIZED).defaultValue(this.enumSuffix)); cliOptions.add(new CliOption(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_DESC).defaultValue(this.enumPropertyNaming.name())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue(this.modelPropertyNaming)); cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue(String.valueOf(this.getSupportsES6()))); @@ -179,6 +188,9 @@ public void processOpts() { LOGGER.info("Warning: Environment variable 'TS_POST_PROCESS_FILE' is set but file post-processing is not enabled. To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); } + if (additionalProperties.containsKey(CodegenConstants.ENUM_NAME_SUFFIX)) { + enumSuffix = additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString(); + } if (additionalProperties.containsKey(CodegenConstants.ENUM_PROPERTY_NAMING)) { setEnumPropertyNaming((String) additionalProperties.get(CodegenConstants.ENUM_PROPERTY_NAMING)); } @@ -195,6 +207,11 @@ public void processOpts() { if (additionalProperties.containsKey(NPM_NAME)) { this.setNpmName(additionalProperties.get(NPM_NAME).toString()); } + + if (enumSuffix.equals(ENUM_NAME_SUFFIX_V4_COMPAT)) { + isEnumSuffixV4Compat = true; + enumSuffix = modelNameSuffix + "Enum"; + } } @Override @@ -298,40 +315,55 @@ private boolean propertyHasBreakingCharacters(String str) { @Override public String toModelName(final String name) { - ArrayList exceptions = new ArrayList(Arrays.asList("\\|", " ")); - String sanName = sanitizeName(name, "(?![| ])\\W", exceptions); + String fullModelName = name; + fullModelName = addPrefix(fullModelName, modelNamePrefix); + fullModelName = addSuffix(fullModelName, modelNameSuffix); + return toTypescriptTypeName(fullModelName, "Model"); + } - if (!StringUtils.isEmpty(modelNamePrefix)) { - sanName = modelNamePrefix + "_" + sanName; + protected String addPrefix(String name, String prefix) { + if (!StringUtils.isEmpty(prefix)) { + name = prefix + "_" + name; } + return name; + } - if (!StringUtils.isEmpty(modelNameSuffix)) { - sanName = sanName + "_" + modelNameSuffix; + protected String addSuffix(String name, String suffix) { + if (!StringUtils.isEmpty(suffix)) { + name = name + "_" + suffix; } + return name; + } + + protected String toTypescriptTypeName(final String name, String safePrefix) { + ArrayList exceptions = new ArrayList(Arrays.asList("\\|", " ")); + String sanName = sanitizeName(name, "(?![| ])\\W", exceptions); + + sanName = camelize(sanName); + // model name cannot use reserved keyword, e.g. return + // this is unlikely to happen, because we have just camelized the name, while reserved words are usually all lowcase if (isReservedWord(sanName)) { - String modelName = camelize("model_" + sanName); + String modelName = safePrefix + sanName; LOGGER.warn(sanName + " (reserved word) cannot be used as model name. Renamed to " + modelName); return modelName; } // model name starts with number if (sanName.matches("^\\d.*")) { - String modelName = camelize("model_" + sanName); // e.g. 200Response => Model200Response (after camelize) + String modelName = safePrefix + sanName; // e.g. 200Response => Model200Response LOGGER.warn(sanName + " (model name starts with number) cannot be used as model name. Renamed to " + modelName); return modelName; } if (languageSpecificPrimitives.contains(sanName)) { - String modelName = camelize("model_" + sanName); + String modelName = safePrefix + sanName; LOGGER.warn(sanName + " (model name matches existing language type) cannot be used as a model name. Renamed to " + modelName); return modelName; } - // camelize the model name - // phone_number => PhoneNumber - return camelize(sanName); + return sanName; } @Override @@ -584,12 +616,9 @@ public String toEnumVarName(String name, String datatype) { @Override public String toEnumName(CodegenProperty property) { - String enumName = toModelName(property.name) + enumSuffix; - if (enumName.matches("\\d.*")) { // starts with number - return "_" + enumName; - } else { - return enumName; - } + String enumName = property.name; + enumName = addSuffix(enumName, enumSuffix); + return toTypescriptTypeName(enumName, "_"); } protected void setEnumPropertyNaming(String naming) { 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 fc0f886c1df4..bbf91dbd9b46 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 @@ -160,7 +160,6 @@ public void processOpts() { setStringEnums(Boolean.valueOf(additionalProperties.get(STRING_ENUMS).toString())); additionalProperties.put("stringEnums", getStringEnums()); if (getStringEnums()) { - enumSuffix = ""; classEnumSeparator = ""; } } @@ -228,6 +227,23 @@ public void processOpts() { if (additionalProperties.containsKey(FILE_NAMING)) { this.setFileNaming(additionalProperties.get(FILE_NAMING).toString()); } + + if (isEnumSuffixV4Compat) { + applyEnumSuffixV4CompatMode(); + } + } + + private void applyEnumSuffixV4CompatMode() { + String fullModelSuffix = modelSuffix + modelNameSuffix; + if (stringEnums) { + // with stringEnums, legacy code would discard "Enum" suffix altogether + // resulting in smth like PetModelTypeModeL + enumSuffix = fullModelSuffix; + } else { + // without stringEnums, "Enum" was appended to model suffix, e.g. PetModel.TypeModelEnum + enumSuffix = fullModelSuffix + "Enum"; + } + } private void addNpmPackageGeneration(SemVer ngVersion) { @@ -605,10 +621,7 @@ private String getApiFilenameFromClassname(String classname) { @Override public String toModelName(String name) { - if (modelSuffix.length() != 0 && !name.endsWith(modelSuffix)) { - name = name + modelSuffix; - } - + name = addSuffix(name, modelSuffix); return super.toModelName(name); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index 1aaf04f213fe..d65ba459df6a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -25,6 +25,7 @@ public class TypeScriptAngularClientOptionsProvider implements OptionsProvider { public static final String SUPPORTS_ES6_VALUE = "false"; + public static final String ENUM_NAME_SUFFIX = "Enum"; public static final String STRING_ENUMS_VALUE = "false"; public static final String SORT_PARAMS_VALUE = "false"; public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; @@ -58,6 +59,7 @@ public Map createOptions() { .put(CodegenConstants.ENUM_PROPERTY_NAMING, ENUM_PROPERTY_NAMING_VALUE) .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_VALUE) .put(CodegenConstants.SUPPORTS_ES6, SUPPORTS_ES6_VALUE) + .put(CodegenConstants.ENUM_NAME_SUFFIX, ENUM_NAME_SUFFIX) .put(TypeScriptAngularClientCodegen.STRING_ENUMS, STRING_ENUMS_VALUE) .put(TypeScriptAngularClientCodegen.NPM_NAME, NMP_NAME) .put(TypeScriptAngularClientCodegen.NPM_VERSION, NMP_VERSION) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java index 8c6f9efde044..11aa70a681a8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java @@ -24,6 +24,7 @@ public class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider { public static final String SUPPORTS_ES6_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"; @@ -43,6 +44,7 @@ public Map createOptions() { 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(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) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index 1105fa14a45d..2ec182979cc4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -28,6 +28,7 @@ public class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; public static final Boolean SUPPORTS_ES6_VALUE = false; + public static final String ENUM_NAME_SUFFIX = "Enum"; public static final String ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; private static final String NPM_NAME = "npmName"; @@ -49,6 +50,7 @@ public Map createOptions() { .put(CodegenConstants.ENUM_PROPERTY_NAMING, ENUM_PROPERTY_NAMING_VALUE) .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_VALUE) .put(CodegenConstants.SUPPORTS_ES6, String.valueOf(SUPPORTS_ES6_VALUE)) + .put(CodegenConstants.ENUM_NAME_SUFFIX, ENUM_NAME_SUFFIX) .put(TypeScriptAureliaClientCodegen.NPM_NAME, NPM_NAME) .put(TypeScriptAureliaClientCodegen.NPM_VERSION, NPM_VERSION) .put(TypeScriptAureliaClientCodegen.SNAPSHOT, Boolean.FALSE.toString()) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 6bf1bb7b0822..fe637cfe52be 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -28,6 +28,7 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider { public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; public static final Boolean SUPPORTS_ES6_VALUE = false; + public static final String ENUM_NAME_SUFFIX = "Enum"; public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; public static final String ENUM_PROPERTY_NAMING_VALUE = "PascalCase"; private static final String NMP_NAME = "npmName"; @@ -51,6 +52,7 @@ public Map createOptions() { .put(CodegenConstants.ENUM_PROPERTY_NAMING, ENUM_PROPERTY_NAMING_VALUE) .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_VALUE) .put(CodegenConstants.SUPPORTS_ES6, String.valueOf(SUPPORTS_ES6_VALUE)) + .put(CodegenConstants.ENUM_NAME_SUFFIX, ENUM_NAME_SUFFIX) .put(TypeScriptFetchClientCodegen.NPM_NAME, NMP_NAME) .put(TypeScriptFetchClientCodegen.NPM_VERSION, NMP_VERSION) .put(TypeScriptFetchClientCodegen.NPM_REPOSITORY, NPM_REPOSITORY) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java index c46fea54e3c4..a369f1a2f561 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java @@ -26,6 +26,7 @@ public class TypeScriptNodeClientOptionsProvider implements OptionsProvider { public static final String SUPPORTS_ES6_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"; @@ -49,6 +50,7 @@ public Map createOptions() { 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(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) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchModelTest.java index 58b8848a6f07..ec451b308d3e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchModelTest.java @@ -227,6 +227,7 @@ public void enumArrayMdoelTest() { // TODO: update yaml file. final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"); final DefaultCodegen codegen = new TypeScriptFetchClientCodegen(); + codegen.processOpts(); codegen.setOpenAPI(openAPI); final Schema schema = openAPI.getComponents().getSchemas().get("EnumArrays"); @@ -264,6 +265,7 @@ public void enumArrayMdoelTest() { public void enumMdoelValueTest() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"); final DefaultCodegen codegen = new TypeScriptFetchClientCodegen(); + codegen.processOpts(); codegen.setOpenAPI(openAPI); final Schema schema = openAPI.getComponents().getSchemas().get("Enum_Test"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java index 6a538c692739..a1a07d28aa68 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java @@ -10,6 +10,7 @@ import io.swagger.v3.oas.models.responses.ApiResponses; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptAngularClientCodegen; import org.testng.Assert; @@ -54,6 +55,57 @@ public void testModelSuffix() { Assert.assertEquals(codegen.toModelName("Error"), "ErrorMySuffix"); } + @Test + public void testToEnumName() { + TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.ENUM_NAME_SUFFIX, "Enum"); + codegen.processOpts(); + + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameEnum"); + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("123")), "_123Enum"); + + // enum value should not use model suffix + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(TypeScriptAngularClientCodegen.MODEL_SUFFIX, "Model"); + codegen.additionalProperties().put(CodegenConstants.ENUM_NAME_SUFFIX, "Enum2"); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameEnum2"); + + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.ENUM_NAME_SUFFIX, ""); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestName"); + } + + @Test + public void testToEnumNameCompatMode() { + TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen(); + // default - stringEnums=false + codegen.processOpts(); + + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameEnum"); + + // model suffix is prepended to "Enum" suffix + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.MODEL_NAME_SUFFIX, "Model1"); + codegen.additionalProperties().put(TypeScriptAngularClientCodegen.MODEL_SUFFIX, "Model2"); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameModel2Model1Enum"); + + codegen = new TypeScriptAngularClientCodegen(); + codegen.additionalProperties().put(TypeScriptAngularClientCodegen.STRING_ENUMS, true); + codegen.additionalProperties().put(CodegenConstants.MODEL_NAME_SUFFIX, "Model1"); + codegen.additionalProperties().put(TypeScriptAngularClientCodegen.MODEL_SUFFIX, "Model2"); + codegen.processOpts(); + Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameModel2Model1"); + } + + private CodegenProperty makeEnumProperty(String name) { + CodegenProperty enumProperty = new CodegenProperty(); + enumProperty.name = name; + return enumProperty; + } + @Test public void testModelFileSuffix() { TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen(); From f06ac9d91c19b93d488803ed09959560a871deb8 Mon Sep 17 00:00:00 2001 From: "Yutaka.Miyamae" <48900426+yutaka0m@users.noreply.github.com> Date: Fri, 31 Jan 2020 22:57:15 +0900 Subject: [PATCH 31/72] Add a link to a ytaka0m blog post (#5176) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9246e7ca297f..25441aa85e07 100644 --- a/README.md +++ b/README.md @@ -722,6 +722,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2020-01-17 - [OpenAPI demo for Pulp 3.0 GA](https://www.youtube.com/watch?v=mFBP-M0ZPfw&t=178s) by [Pulp](https://www.youtube.com/channel/UCI43Ffs4VPDv7awXvvBJfRQ) at [Youtube](https://www.youtube.com/) - 2020-01-19 - [Why document a REST API as code?](https://dev.to/rolfstreefkerk/why-document-a-rest-api-as-code-5e7p) by [Rolf Streefkerk](https://github.com/rpstreef) at [DEV Community](https://dev.to) - 2020-01-28 - [Get Your Serverless Swagger Back with OpenAPI](https://dev.to/matttyler/get-your-serverless-swagger-back-with-openapi-48gc) by [Matt Tyler](https://dev.to/matttyler) +- 2020-01-30 - [OpenAPI Generatorへのコントリビュート](https://www.yutaka0m.work/entry/2020/01/30/163905) by [yutaka0m](https://github.com/yutaka0m) - ## [6 - About Us](#table-of-contents) From 22c6c0ca68aee25ca7923f7eff85079f9dc08376 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Fri, 31 Jan 2020 12:19:16 -0500 Subject: [PATCH 32/72] [core] Extracting recommendations to validation framework (#4979) * [core] Extracting recommendations to validation framework This is work to extract recommendation logic out of the CLI validate command into a shared evaluation instance which can be used elsewhere (such as Gradle, or the Online tool). For now, these validations are in addition to those provided by swagger-parser and are only the following recommendations: * Apache/Nginx warning that header values with underscore are dropped by default * Unused models/schemas * Use of properties with oneOf, which is ambiguous in OpenAPI Specification I've allowed for disabling recommendations via System properties, since this is something that has been requested a few times by users. System properties in this commit include: * openapi.generator.rule.recommendations=false - Allows for disabling recommendations completely. This wouldn't include all warnings and errors, only those we deem to be suggestions * openapi.generator.rule.apache-nginx-underscore=false - Allows for disabling the Apache/Nginx warning when header names have underscore - This is a legacy CGI configuration, and doesn't affect all web servers * openapi.generator.rule.oneof-properties-ambiguity=false - We support this functionality, but the specification may not intend for it - This is more to reduce noise * openapi.generator.rule.unused-schemas=false - We will warn when a schema is not referenced outside of Components, which users have requested to be able to turn off * openapi.generator.rule.anti-patterns.uri-unexpected-body=false * Move recommendation/validations to oas package and add javadoc comments * Refactor and test recommendation validations * Refactor validation function signatures to return explicit state rather than boolean * Add operation recommendation for GET/HEAD w/body --- .../openapitools/codegen/cmd/Validate.java | 46 ++---- .../codegen/validation/GenericValidator.java | 9 +- .../codegen/validation/Invalid.java | 21 ++- .../codegen/validation/Validated.java | 12 ++ .../codegen/validation/ValidationResult.java | 10 +- .../codegen/validation/ValidationRule.java | 85 +++++++++-- .../validation/GenericValidatorTest.java | 32 ++-- .../validation/ValidationRuleTest.java | 22 +-- .../validations/oas/OpenApiEvaluator.java | 94 ++++++++++++ .../oas/OpenApiOperationValidations.java | 75 ++++++++++ .../oas/OpenApiParameterValidations.java | 47 ++++++ .../oas/OpenApiSchemaValidations.java | 57 ++++++++ .../oas/OpenApiSecuritySchemeValidations.java | 47 ++++++ .../validations/oas/OperationWrapper.java | 42 ++++++ .../validations/oas/RuleConfiguration.java | 137 ++++++++++++++++++ .../validations/oas/ValidationConstants.java | 6 + .../oas/OpenApiOperationValidationsTest.java | 116 +++++++++++++++ .../oas/OpenApiParameterValidationsTest.java | 93 ++++++++++++ .../oas/OpenApiSchemaValidationsTest.java | 128 ++++++++++++++++ .../OpenApiSecuritySchemeValidationsTest.java | 87 +++++++++++ 20 files changed, 1090 insertions(+), 76 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidations.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ValidationConstants.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java index 153475f5032a..a790464c781e 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java @@ -22,14 +22,14 @@ import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.ComposedSchema; -import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.core.models.SwaggerParseResult; -import org.openapitools.codegen.utils.ModelUtils; +import org.apache.commons.lang3.text.WordUtils; +import org.openapitools.codegen.validation.ValidationResult; +import org.openapitools.codegen.validations.oas.OpenApiEvaluator; +import org.openapitools.codegen.validations.oas.RuleConfiguration; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; @Command(name = "validate", description = "Validate specification") @@ -54,42 +54,28 @@ public void run() { StringBuilder sb = new StringBuilder(); OpenAPI specification = result.getOpenAPI(); - if (Boolean.TRUE.equals(recommend)) { - if (specification != null) { - // Add information about unused models to the warnings set. - List unusedModels = ModelUtils.getUnusedSchemas(specification); - if (unusedModels != null) { - unusedModels.forEach(name -> warnings.add("Unused model: " + name)); - } - - // check for loosely defined oneOf extension requirements. - // This is a recommendation because the 3.0.x spec is not clear enough on usage of oneOf. - // 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'. - Map schemas = ModelUtils.getSchemas(specification); - schemas.forEach((key, schema) -> { - if (schema instanceof ComposedSchema) { - final ComposedSchema composed = (ComposedSchema) schema; - if (composed.getOneOf() != null && composed.getOneOf().size() > 0) { - if (composed.getProperties() != null && composed.getProperties().size() >= 1 && composed.getProperties().get("discriminator") == null) { - warnings.add("Schema (oneOf) should not contain properties: " + key); - } - } - } - }); - } - } + RuleConfiguration ruleConfiguration = new RuleConfiguration(); + ruleConfiguration.setEnableRecommendations(recommend != null ? recommend : false); + + OpenApiEvaluator evaluator = new OpenApiEvaluator(ruleConfiguration); + ValidationResult validationResult = evaluator.validate(specification); + + // TODO: We could also provide description here along with getMessage. getMessage is either a "generic" message or specific (e.g. Model 'Cat' has issues). + // This would require that we parse the messageList coming from swagger-parser into a better structure. + validationResult.getWarnings().forEach(invalid -> warnings.add(invalid.getMessage())); + validationResult.getErrors().forEach(invalid -> errors.add(invalid.getMessage())); if (!errors.isEmpty()) { sb.append("Errors:").append(System.lineSeparator()); errors.forEach(msg -> - sb.append("\t-").append(msg).append(System.lineSeparator()) + sb.append("\t- ").append(WordUtils.wrap(msg, 90).replace(System.lineSeparator(), System.lineSeparator() + "\t ")).append(System.lineSeparator()) ); } if (!warnings.isEmpty()) { sb.append("Warnings: ").append(System.lineSeparator()); warnings.forEach(msg -> - sb.append("\t-").append(msg).append(System.lineSeparator()) + sb.append("\t- ").append(WordUtils.wrap(msg, 90).replace(System.lineSeparator(), System.lineSeparator() + "\t ")).append(System.lineSeparator()) ); } diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java index c095bc5abd54..00e4e00e463d 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java @@ -23,9 +23,8 @@ * * @param The type of object being evaluated. */ -@SuppressWarnings({"WeakerAccess"}) public class GenericValidator implements Validator { - private List rules; + protected List rules; /** * Constructs a new instance of {@link GenericValidator}. @@ -48,11 +47,11 @@ public ValidationResult validate(TInput input) { ValidationResult result = new ValidationResult(); if (rules != null) { rules.forEach(it -> { - boolean passes = it.evaluate(input); - if (passes) { + ValidationRule.Result attempt = it.evaluate(input); + if (attempt.passed()) { result.addResult(Validated.valid(it)); } else { - result.addResult(Validated.invalid(it, it.getFailureMessage())); + result.addResult(Validated.invalid(it, it.getFailureMessage(), attempt.getDetails())); } }); } diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java index ad59a6285369..131e7a73465d 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java @@ -23,6 +23,7 @@ public final class Invalid extends Validated { private String message; private ValidationRule rule; + private String details; /** * Constructs a new {@link Invalid} instance. @@ -35,13 +36,29 @@ public final class Invalid extends Validated { this.message = message; } + /** + * Constructs a new {@link Invalid} instance. + * + * @param rule The rule which was evaluated and resulted in this state. + * @param message The message to be displayed for this invalid state. + * @param details Additional contextual details related to the invalid state. + */ + public Invalid(ValidationRule rule, String message, String details) { + this(rule, message); + this.details = details; + } + + public String getDetails() { + return details; + } + @Override - String getMessage() { + public String getMessage() { return message; } @Override - ValidationRule getRule() { + public ValidationRule getRule() { return rule; } diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java index 2df3b9c3ae3c..05f9df833e4b 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java @@ -54,6 +54,18 @@ boolean isValid() { public static Validated invalid(ValidationRule rule, String message) { return new Invalid(rule, message); } + /** + * Creates an instance of an {@link Invalid} validation state. + * + * @param rule The rule which was evaluated. + * @param message The message to display to a user. + * @param details Additional contextual details related to the invalid state. + * + * @return A {@link Validated} instance representing an invalid state according to the rule. + */ + public static Validated invalid(ValidationRule rule, String message, String details) { + return new Invalid(rule, message, details); + } /** * Creates an instance of an {@link Valid} validation state. diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java index 374c35445441..628a11a225c0 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java @@ -24,7 +24,6 @@ /** * Encapsulates details about the result of a validation test. */ -@SuppressWarnings("WeakerAccess") public final class ValidationResult { private final List validations; @@ -96,9 +95,16 @@ public List getWarnings(){ public void addResult(Validated validated) { synchronized (validations) { ValidationRule rule = validated.getRule(); - if (rule != null && !rule.equals(ValidationRule.empty())) { + if (rule != null && !rule.equals(ValidationRule.empty()) && !validations.contains(validated)) { validations.add(validated); } } } + + public ValidationResult consume(ValidationResult other) { + synchronized (validations) { + validations.addAll(other.validations); + } + return this; + } } diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java index e220e0482cf6..8d5818b2887b 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java @@ -26,7 +26,7 @@ public class ValidationRule { private Severity severity; private String description; private String failureMessage; - private Function test; + private Function test; /** * Constructs a new instance of {@link ValidationRule} @@ -37,7 +37,7 @@ public class ValidationRule { * @param test The test condition to be applied as a part of this rule, when this function returns true, * the evaluated instance will be considered "valid" according to this rule. */ - ValidationRule(Severity severity, String description, String failureMessage, Function test) { + ValidationRule(Severity severity, String description, String failureMessage, Function test) { this.severity = severity; this.description = description; this.failureMessage = failureMessage; @@ -60,7 +60,7 @@ public String getFailureMessage() { * * @return true if the object state is valid according to this rule, otherwise false. */ - public boolean evaluate(Object input) { + public Result evaluate(Object input) { return test.apply(input); } @@ -90,7 +90,7 @@ public String getDescription() { * @return An "empty" rule. */ static ValidationRule empty() { - return new ValidationRule(Severity.ERROR, "empty", "failure message", (i) -> false); + return new ValidationRule(Severity.ERROR, "empty", "failure message", (i) -> Fail.empty() ); } /** @@ -106,8 +106,8 @@ static ValidationRule empty() { * @return A new instance of a {@link ValidationRule} */ @SuppressWarnings("unchecked") - public static ValidationRule create(Severity severity, String description, String failureMessage, Function fn) { - return new ValidationRule(severity, description, failureMessage, (Function) fn); + public static ValidationRule create(Severity severity, String description, String failureMessage, Function fn) { + return new ValidationRule(severity, description, failureMessage, (Function) fn); } /** @@ -121,8 +121,8 @@ public static ValidationRule create(Severity severity, String description, S * @return A new instance of a {@link ValidationRule} */ @SuppressWarnings("unchecked") - public static ValidationRule error(String failureMessage, Function fn) { - return new ValidationRule(Severity.ERROR, null, failureMessage, (Function) fn); + public static ValidationRule error(String failureMessage, Function fn) { + return new ValidationRule(Severity.ERROR, null, failureMessage, (Function) fn); } /** @@ -137,8 +137,8 @@ public static ValidationRule error(String failureMessage, Function ValidationRule warn(String description, String failureMessage, Function fn) { - return new ValidationRule(Severity.WARNING, description, failureMessage, (Function) fn); + public static ValidationRule warn(String description, String failureMessage, Function fn) { + return new ValidationRule(Severity.WARNING, description, failureMessage, (Function) fn); } @Override @@ -149,4 +149,69 @@ public String toString() { ", failureMessage='" + failureMessage + '\'' + '}'; } + + public static abstract class Result { + protected String details = null; + protected Throwable throwable = null; + + public String getDetails() { + return details; + } + + public void setDetails(String details) { + assert this.details == null; + this.details = details; + } + + public abstract boolean passed(); + public final boolean failed() { return !passed(); } + + public Throwable getThrowable() { + return throwable; + } + + public boolean thrown() { return this.throwable == null; } + } + + public static final class Pass extends Result { + public static Result empty() { return new Pass(); } + + public Pass() { + super(); + } + + public Pass(String details) { + this(); + this.details = details; + } + + @Override + public boolean passed() { + return true; + } + } + + public static final class Fail extends Result { + public static Result empty() { return new Fail(); } + + public Fail() { + super(); + } + + public Fail(String details) { + this(); + this.details = details; + } + + public Fail(String details, Throwable throwable) { + this(); + this.throwable = throwable; + this.details = details; + } + + @Override + public boolean passed() { + return false; + } + } } diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java index d37dc827c845..3fa8874ff19c 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java @@ -25,7 +25,7 @@ import java.util.Optional; public class GenericValidatorTest { - class Person { + static class Person { private int age; private String name; @@ -35,33 +35,33 @@ class Person { } } - private static boolean isValidAge(Person person) { - return person.age > 0; + private static ValidationRule.Result checkAge(Person person) { + return person.age > 0 ? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } - private static boolean isAdult(Person person) { - return person.age > 18; + private static ValidationRule.Result checkAdult(Person person) { + return person.age > 18 ? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } - private static boolean isNameSet(Person person) { - return person.name != null && person.name.length() > 0; + private static ValidationRule.Result checkName(Person person) { + return (person.name != null && person.name.length() > 0) ? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } - private static boolean isNameValid(Person person) { + private static ValidationRule.Result checkNamePattern(Person person) { String pattern = "^[A-Z][a-z]*$"; - return person.name.matches(pattern); + return person.name.matches(pattern) ? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } - private static boolean isNameNormalLength(Person person) { - return person.name.length() < 10; + private static ValidationRule.Result checkNameNormalLength(Person person) { + return person.name.length() < 10? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } private List validationRules = Arrays.asList( - ValidationRule.error("Age must be positive and more than zero", GenericValidatorTest::isValidAge), - ValidationRule.error("Only adults (18 years old and older)", GenericValidatorTest::isAdult), - ValidationRule.error("Name isn't set!", GenericValidatorTest::isNameSet), - ValidationRule.error("Name isn't formatted correct", GenericValidatorTest::isNameValid), - ValidationRule.warn("Name too long?", "Name may be too long.", GenericValidatorTest::isNameNormalLength) + ValidationRule.error("Age must be positive and more than zero", GenericValidatorTest::checkAge), + ValidationRule.error("Only adults (18 years old and older)", GenericValidatorTest::checkAdult), + ValidationRule.error("Name isn't set!", GenericValidatorTest::checkName), + ValidationRule.error("Name isn't formatted correct", GenericValidatorTest::checkNamePattern), + ValidationRule.warn("Name too long?", "Name may be too long.", GenericValidatorTest::checkNameNormalLength) ); @Test diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java index ce0fa165ce7a..b626085c8b3a 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java @@ -33,13 +33,13 @@ public String getName() { } } - private static boolean checkName(Sample input) { - return input.getName() != null && input.getName().length() > 7; + private static ValidationRule.Result checkName(Sample input) { + return (input.getName() != null && input.getName().length() > 7) ? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } - private static boolean checkPattern(Sample input) { + private static ValidationRule.Result checkPattern(Sample input) { String pattern = "^[A-Z][a-z]*$"; - return input.getName() != null && input.getName().matches(pattern); + return (input.getName() != null && input.getName().matches(pattern)) ? ValidationRule.Pass.empty() : ValidationRule.Fail.empty(); } @Test @@ -49,10 +49,10 @@ public void createMethodUsingMethodReference(){ Sample seven = new Sample("1234567"); Sample eight = new Sample("12345678"); ValidationRule result = ValidationRule.error("test", ValidationRuleTest::checkName); - assertFalse(result.evaluate(nil)); - assertFalse(result.evaluate(six)); - assertFalse(result.evaluate(seven)); - assertTrue(result.evaluate(eight)); + assertFalse(result.evaluate(nil).passed()); + assertFalse(result.evaluate(six).passed()); + assertFalse(result.evaluate(seven).passed()); + assertTrue(result.evaluate(eight).passed()); } @Test @@ -61,8 +61,8 @@ public void createMethodUsingLambda(){ Sample lowercase = new Sample("jim"); Sample titlecase = new Sample("Jim"); ValidationRule result = ValidationRule.error("test", i -> checkPattern((Sample)i)); - assertFalse(result.evaluate(nil)); - assertFalse(result.evaluate(lowercase)); - assertTrue(result.evaluate(titlecase)); + assertFalse(result.evaluate(nil).passed()); + assertFalse(result.evaluate(lowercase).passed()); + assertTrue(result.evaluate(titlecase).passed()); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java new file mode 100644 index 000000000000..e28a69b4386b --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java @@ -0,0 +1,94 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Paths; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.validation.*; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * A validator which evaluates an OpenAPI 3.x specification document + */ +public class OpenApiEvaluator implements Validator { + private RuleConfiguration ruleConfiguration; + + /** + * Constructs a new instance of {@link OpenApiEvaluator} with applied rules. + * + * @param ruleConfiguration The set of rules to be applied to evaluation. + */ + public OpenApiEvaluator(RuleConfiguration ruleConfiguration) { + this.ruleConfiguration = ruleConfiguration; + } + + /** + * Validates input, resulting in a instance of {@link ValidationResult} which provides details on all validations performed (success, error, warning). + * + * @param specification The {@link OpenAPI} object instance to be validated. + * @return A {@link ValidationResult} which details the success, error, and warning validation results. + */ + @Override + public ValidationResult validate(OpenAPI specification) { + ValidationResult validationResult = new ValidationResult(); + if (specification == null) return validationResult; + + OpenApiParameterValidations parameterValidations = new OpenApiParameterValidations(ruleConfiguration); + OpenApiSecuritySchemeValidations securitySchemeValidations = new OpenApiSecuritySchemeValidations(ruleConfiguration); + OpenApiSchemaValidations schemaValidations = new OpenApiSchemaValidations(ruleConfiguration); + OpenApiOperationValidations operationValidations = new OpenApiOperationValidations(ruleConfiguration); + + if (ruleConfiguration.isEnableUnusedSchemasRecommendation()) { + ValidationRule unusedSchema = ValidationRule.create(Severity.WARNING, "Unused schema", "A schema was determined to be unused.", s -> ValidationRule.Pass.empty()); + ModelUtils.getUnusedSchemas(specification).forEach(schemaName -> validationResult.addResult(Validated.invalid(unusedSchema, "Unused model: " + schemaName))); + } + + Map schemas = ModelUtils.getSchemas(specification); + schemas.forEach((key, schema) -> validationResult.consume(schemaValidations.validate(schema))); + + List parameters = new ArrayList<>(50); + + Paths paths = specification.getPaths(); + if (paths != null) { + paths.forEach((key, pathItem) -> { + // parameters defined "globally" + List pathParameters = pathItem.getParameters(); + if (pathParameters != null) parameters.addAll(pathItem.getParameters()); + + pathItem.readOperationsMap().forEach((httpMethod, op) -> { + if (op != null) { + // parameters on each operation method + if (op.getParameters() != null) { + parameters.addAll(op.getParameters()); + } + + OperationWrapper wrapper = new OperationWrapper(op, httpMethod); + validationResult.consume(operationValidations.validate(wrapper)); + } + }); + }); + } + + Components components = specification.getComponents(); + if (components != null) { + Map securitySchemes = components.getSecuritySchemes(); + if (securitySchemes != null && !securitySchemes.isEmpty()) { + securitySchemes.values().forEach(securityScheme -> validationResult.consume(securitySchemeValidations.validate(securityScheme))); + } + + if (components.getParameters() != null) { + parameters.addAll(components.getParameters().values()); + } + } + + parameters.forEach(parameter -> validationResult.consume(parameterValidations.validate(parameter))); + + return validationResult; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidations.java new file mode 100644 index 000000000000..9b1de83e5242 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidations.java @@ -0,0 +1,75 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.parameters.RequestBody; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.validation.GenericValidator; +import org.openapitools.codegen.validation.ValidationRule; + +import java.util.ArrayList; +import java.util.Locale; + +/** + * A standalone instance for evaluating rule and recommendations related to OAS {@link io.swagger.v3.oas.models.Operation} + */ +class OpenApiOperationValidations extends GenericValidator { + OpenApiOperationValidations(RuleConfiguration ruleConfiguration) { + super(new ArrayList<>()); + if (ruleConfiguration.isEnableRecommendations()) { + if (ruleConfiguration.isEnableApiRequestUriWithBodyRecommendation()) { + rules.add(ValidationRule.warn( + "API GET/HEAD defined with request body", + "While technically allowed, GET/HEAD with request body may indicate programming error, and is considered an anti-pattern.", + OpenApiOperationValidations::checkAntipatternGetOrHeadWithBody + )); + } + } + } + + /** + * Determines whether a GET or HEAD operation is configured to expect a body. + *

+ * RFC7231 describes this behavior as: + *

+ * A payload within a GET request message has no defined semantics; + * sending a payload body on a GET request might cause some existing + * implementations to reject the request. + *

+ * See https://tools.ietf.org/html/rfc7231#section-4.3.1 + *

+ * Because there are no defined semantics, and because some client and server implementations + * may silently ignore the entire body (see https://xhr.spec.whatwg.org/#the-send()-method) or + * throw an error (see https://fetch.spec.whatwg.org/#ref-for-dfn-throw%E2%91%A1%E2%91%A1), + * we maintain that the existence of a body for this operation is most likely programmer error and raise awareness. + * + * @param wrapper Wraps an operation with accompanying HTTP Method + * @return {@link ValidationRule.Pass} if the check succeeds, otherwise {@link ValidationRule.Fail} + */ + private static ValidationRule.Result checkAntipatternGetOrHeadWithBody(OperationWrapper wrapper) { + if (wrapper == null) { + return ValidationRule.Pass.empty(); + } + + ValidationRule.Result result = ValidationRule.Pass.empty(); + + if (wrapper.getHttpMethod() == PathItem.HttpMethod.GET || wrapper.getHttpMethod() == PathItem.HttpMethod.HEAD) { + RequestBody body = wrapper.getOperation().getRequestBody(); + + if (body != null) { + if (StringUtils.isNotEmpty(body.get$ref()) || (body.getContent() != null && body.getContent().size() > 0)) { + result = new ValidationRule.Fail(); + result.setDetails(String.format( + Locale.ROOT, + "%s %s contains a request body and is considered an anti-pattern.", + wrapper.getHttpMethod().name(), + wrapper.getOperation().getOperationId()) + ); + } + } + + } + + return result; + } + +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java new file mode 100644 index 000000000000..0e3585585a03 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java @@ -0,0 +1,47 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.parameters.HeaderParameter; +import io.swagger.v3.oas.models.parameters.Parameter; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.validation.GenericValidator; +import org.openapitools.codegen.validation.ValidationRule; + +import java.util.ArrayList; +import java.util.Locale; + +/** + * A standalone instance for evaluating rules and recommendations related to OAS {@link Parameter} + */ +class OpenApiParameterValidations extends GenericValidator { + OpenApiParameterValidations(RuleConfiguration ruleConfiguration) { + super(new ArrayList<>()); + if (ruleConfiguration.isEnableRecommendations()) { + if (ruleConfiguration.isEnableApacheNginxUnderscoreRecommendation()) { + rules.add(ValidationRule.warn( + ValidationConstants.ApacheNginxUnderscoreDescription, + ValidationConstants.ApacheNginxUnderscoreFailureMessage, + OpenApiParameterValidations::apacheNginxHeaderCheck + )); + } + } + } + + /** + * Apache and Nginx default to legacy CGI behavior in which header with underscore are ignored. Raise this for awareness to the user. + * + * @param parameter Any spec doc parameter. The method will handle {@link HeaderParameter} evaluation. + * @return {@link ValidationRule.Pass} if the check succeeds, otherwise {@link ValidationRule.Fail} with details "[key] contains an underscore." + */ + private static ValidationRule.Result apacheNginxHeaderCheck(Parameter parameter) { + if (parameter == null || !parameter.getIn().equals("header")) return ValidationRule.Pass.empty(); + ValidationRule.Result result = ValidationRule.Pass.empty(); + + String headerName = parameter.getName(); + if (StringUtils.isNotEmpty(headerName) && StringUtils.contains(headerName, '_')) { + result = new ValidationRule.Fail(); + result.setDetails(String.format(Locale.ROOT, "%s contains an underscore.", headerName)); + } + + return result; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java new file mode 100644 index 000000000000..bfb829a8010f --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java @@ -0,0 +1,57 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.media.ComposedSchema; +import io.swagger.v3.oas.models.media.Schema; +import org.openapitools.codegen.validation.GenericValidator; +import org.openapitools.codegen.validation.ValidationRule; + +import java.util.ArrayList; + +/** + * A standalone instance for evaluating rules and recommendations related to OAS {@link Schema} + */ +class OpenApiSchemaValidations extends GenericValidator { + OpenApiSchemaValidations(RuleConfiguration ruleConfiguration) { + super(new ArrayList<>()); + if (ruleConfiguration.isEnableRecommendations()) { + if (ruleConfiguration.isEnableOneOfWithPropertiesRecommendation()) { + rules.add(ValidationRule.warn( + "Schema defines properties alongside oneOf.", + "Schemas defining properties and oneOf are not clearly defined in the OpenAPI Specification. While our tooling supports this, it may cause issues with other tools.", + OpenApiSchemaValidations::checkOneOfWithProperties + )); + } + } + } + + /** + * JSON Schema defines oneOf as a validation property which can be applied to any schema. + *

+ * OpenAPI Specification is a variant of JSON Schema for which oneOf is defined as: + * "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema." + *

+ * Where the only examples of oneOf in OpenAPI Specification are used to define either/or type structures rather than validations. + * Because of this ambiguity in the spec about what is non-standard about oneOf support, we'll warn as a recommendation that + * properties on the schema defining oneOf relationships may not be intentional in the OpenAPI Specification. + * + * @param schema An input schema, regardless of the type of schema + * @return {@link ValidationRule.Pass} if the check succeeds, otherwise {@link ValidationRule.Fail} + */ + private static ValidationRule.Result checkOneOfWithProperties(Schema schema) { + ValidationRule.Result result = ValidationRule.Pass.empty(); + + if (schema instanceof ComposedSchema) { + final ComposedSchema composed = (ComposedSchema) schema; + // check for loosely defined oneOf extension requirements. + // This is a recommendation because the 3.0.x spec is not clear enough on usage of oneOf. + // 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'. + if (composed.getOneOf() != null && composed.getOneOf().size() > 0) { + if (composed.getProperties() != null && composed.getProperties().size() >= 1 && composed.getProperties().get("discriminator") == null) { + // not necessarily "invalid" here, but we trigger the recommendation which requires the method to return false. + result = ValidationRule.Fail.empty(); + } + } + } + return result; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java new file mode 100644 index 000000000000..53bc3f5224e4 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java @@ -0,0 +1,47 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.validation.GenericValidator; +import org.openapitools.codegen.validation.ValidationRule; + +import java.util.ArrayList; +import java.util.Locale; + +/** + * A standalone instance for evaluating rules and recommendations related to OAS {@link SecurityScheme} + */ +class OpenApiSecuritySchemeValidations extends GenericValidator { + OpenApiSecuritySchemeValidations(RuleConfiguration ruleConfiguration) { + super(new ArrayList<>()); + if (ruleConfiguration.isEnableRecommendations()) { + if (ruleConfiguration.isEnableApacheNginxUnderscoreRecommendation()) { + rules.add(ValidationRule.warn( + ValidationConstants.ApacheNginxUnderscoreDescription, + ValidationConstants.ApacheNginxUnderscoreFailureMessage, + OpenApiSecuritySchemeValidations::apacheNginxHeaderCheck + )); + } + } + } + + /** + * Apache and Nginx default to legacy CGI behavior in which header with underscore are ignored. Raise this for awareness to the user. + * + * @param securityScheme Security schemes are often used as header parameters (e.g. APIKEY). + * @return true if the check succeeds (header does not have an underscore, e.g. 'api_key') + */ + private static ValidationRule.Result apacheNginxHeaderCheck(SecurityScheme securityScheme) { + if (securityScheme == null || securityScheme.getIn() != SecurityScheme.In.HEADER) + return ValidationRule.Pass.empty(); + ValidationRule.Result result = ValidationRule.Pass.empty(); + + String key = securityScheme.getName(); + if (StringUtils.contains(key, '_')) { + result = new ValidationRule.Fail(); + result.setDetails(String.format(Locale.ROOT, "%s contains an underscore.", key)); + } + + return result; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java new file mode 100644 index 000000000000..c2e3b249fdac --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java @@ -0,0 +1,42 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; + +/** + * Encapsulates an operation with its HTTP Method. In OAS, the {@link PathItem} structure contains more than what we'd + * want to evaluate for operation-only checks. + */ +public class OperationWrapper { + private Operation operation; + private PathItem.HttpMethod httpMethod; + + /** + * Constructs a new instance of {@link OperationWrapper} + * + * @param operation The operation instances to wrap + * @param httpMethod The http method to wrap + */ + OperationWrapper(Operation operation, PathItem.HttpMethod httpMethod) { + this.operation = operation; + this.httpMethod = httpMethod; + } + + /** + * Gets the operation associated with the http method + * + * @return An operation instance + */ + public Operation getOperation() { + return operation; + } + + /** + * Gets the http method associated with the operation + * + * @return The http method + */ + public PathItem.HttpMethod getHttpMethod() { + return httpMethod; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java new file mode 100644 index 000000000000..c8238ef590e4 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java @@ -0,0 +1,137 @@ +package org.openapitools.codegen.validations.oas; + +/** + * Allows for configuration of validation rules which will be applied to a specification. + */ +@SuppressWarnings({"WeakerAccess", "unused"}) +public class RuleConfiguration { + private static String propertyPrefix = "openapi.generator.rule"; + private boolean enableRecommendations = defaultedBoolean(propertyPrefix + ".recommendations", true); + private boolean enableApacheNginxUnderscoreRecommendation = defaultedBoolean(propertyPrefix + ".apache-nginx-underscore", true); + private boolean enableOneOfWithPropertiesRecommendation = defaultedBoolean(propertyPrefix + ".oneof-properties-ambiguity", true); + private boolean enableUnusedSchemasRecommendation = defaultedBoolean(propertyPrefix + ".unused-schemas", true); + + private boolean enableApiRequestUriWithBodyRecommendation = defaultedBoolean(propertyPrefix + ".anti-patterns.uri-unexpected-body", true); + + @SuppressWarnings("SameParameterValue") + private static boolean defaultedBoolean(String key, boolean defaultValue) { + String property = System.getProperty(key); + if (property == null) return defaultValue; + return Boolean.parseBoolean(property); + } + + /** + * Gets whether we will raise awareness that header parameters with underscore may be ignored in Apache or Nginx by default. + * For more details, see https://stackoverflow.com/a/22856867/151445. + * + * @return true if enabled, false if disabled + */ + public boolean isEnableApacheNginxUnderscoreRecommendation() { + return enableApacheNginxUnderscoreRecommendation; + } + + /** + * Enable or Disable the recommendation check for Apache/Nginx potentially ignoring header with underscore by default. + *

+ * For more details, see {@link RuleConfiguration#isEnableApacheNginxUnderscoreRecommendation()} + * + * @param enableApacheNginxUnderscoreRecommendation true to enable, false to disable + */ + public void setEnableApacheNginxUnderscoreRecommendation(boolean enableApacheNginxUnderscoreRecommendation) { + this.enableApacheNginxUnderscoreRecommendation = enableApacheNginxUnderscoreRecommendation; + } + + /** + * Gets whether we will raise awareness a GET or HEAD operation is defined with body. + * + * @return true if enabled, false if disabled + */ + public boolean isEnableApiRequestUriWithBodyRecommendation() { + return enableApiRequestUriWithBodyRecommendation; + } + + /** + * Enable or Disable the recommendation check for GET or HEAD operations with bodies. + *

+ * For more details, see {@link RuleConfiguration#isEnableApiRequestUriWithBodyRecommendation()} + * + * @param enableApiRequestUriWithBodyRecommendation true to enable, false to disable + */ + public void setEnableApiRequestUriWithBodyRecommendation(boolean enableApiRequestUriWithBodyRecommendation) { + this.enableApiRequestUriWithBodyRecommendation = enableApiRequestUriWithBodyRecommendation; + } + + /** + * Gets whether the recommendation check for oneOf with sibling properties exists. + *

+ * JSON Schema defines oneOf as a validation property which can be applied to any schema. + *

+ * OpenAPI Specification is a variant of JSON Schema for which oneOf is defined as: + * "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema." + *

+ * Where the only examples of oneOf in OpenAPI Specification are used to define either/or type structures rather than validations. + * Because of this ambiguity in the spec about what is non-standard about oneOf support, we'll warn as a recommendation that + * properties on the schema defining oneOf relationships may not be intentional in the OpenAPI Specification. + * + * @return true if enabled, false if disabled + */ + public boolean isEnableOneOfWithPropertiesRecommendation() { + return enableOneOfWithPropertiesRecommendation; + } + + /** + * Enable or Disable the recommendation check for schemas containing properties and oneOf definitions. + *

+ * For more details, see {@link RuleConfiguration#isEnableOneOfWithPropertiesRecommendation()} + * + * @param enableOneOfWithPropertiesRecommendation true to enable, false to disable + */ + public void setEnableOneOfWithPropertiesRecommendation(boolean enableOneOfWithPropertiesRecommendation) { + this.enableOneOfWithPropertiesRecommendation = enableOneOfWithPropertiesRecommendation; + } + + /** + * Get whether recommendations are enabled. + * + * @return true if enabled, false if disabled + */ + public boolean isEnableRecommendations() { + return enableRecommendations; + } + + /** + * Enable or Disable recommendations. Recommendations are either informational or warning level type validations + * which are raised to communicate issues to the user which they may not be aware of, or for which support in the + * tooling/spec may not be clearly defined. + * + * @param enableRecommendations true to enable, false to disable + */ + public void setEnableRecommendations(boolean enableRecommendations) { + this.enableRecommendations = enableRecommendations; + } + + /** + * Gets whether the recommendation to check for unused schemas is enabled. + *

+ * While the tooling may or may not support generation of models representing unused schemas, we take the stance that + * a schema which is defined but not referenced in an operation or by some schema bound to an operation may be a good + * indicator of a programming error. We surface this information to the user in case the orphaned schema(s) are not + * intentional. + * + * @return true if enabled, false if disabled + */ + public boolean isEnableUnusedSchemasRecommendation() { + return enableUnusedSchemasRecommendation; + } + + /** + * Enable or Disable the recommendation check for unused schemas. + *

+ * For more details, see {@link RuleConfiguration#isEnableUnusedSchemasRecommendation()} + * + * @param enableUnusedSchemasRecommendation true to enable, false to disable + */ + public void setEnableUnusedSchemasRecommendation(boolean enableUnusedSchemasRecommendation) { + this.enableUnusedSchemasRecommendation = enableUnusedSchemasRecommendation; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ValidationConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ValidationConstants.java new file mode 100644 index 000000000000..9571f1bedcdf --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ValidationConstants.java @@ -0,0 +1,6 @@ +package org.openapitools.codegen.validations.oas; + +final class ValidationConstants { + static String ApacheNginxUnderscoreDescription = "Apache and Nginx may fail on headers keys with underscore!"; + static String ApacheNginxUnderscoreFailureMessage = "Apache and Nginx webservers may fail due to legacy CGI constraints enabled by default in which header keys with underscore are disallowed. See https://stackoverflow.com/a/22856867/151445."; +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java new file mode 100644 index 000000000000..c4d911563eca --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java @@ -0,0 +1,116 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.media.Content; +import io.swagger.v3.oas.models.media.MediaType; +import io.swagger.v3.oas.models.parameters.RequestBody; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.validation.Invalid; +import org.openapitools.codegen.validation.ValidationResult; +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.util.List; +import java.util.stream.Collectors; + +public class OpenApiOperationValidationsTest { + @DataProvider(name = "getOrHeadWithBodyExpectations") + public Object[][] getOrHeadWithBodyExpectations() { + return new Object[][]{ + /* method */ /* operationId */ /* ref */ /* content */ /* triggers warning */ + {PathItem.HttpMethod.GET, "opWithRef", "#/components/schemas/Animal", null, true}, + {PathItem.HttpMethod.GET, "opWithContent", null, new Content().addMediaType("a", new MediaType()), true}, + {PathItem.HttpMethod.GET, "opWithoutRefOrContent", null, null, false}, + {PathItem.HttpMethod.HEAD, "opWithRef", "#/components/schemas/Animal", null, true}, + {PathItem.HttpMethod.HEAD, "opWithContent", null, new Content().addMediaType("a", new MediaType()), true}, + {PathItem.HttpMethod.HEAD, "opWithoutRefOrContent", null, null, false}, + {PathItem.HttpMethod.POST, "opWithRef", "#/components/schemas/Animal", null, false}, + {PathItem.HttpMethod.POST, "opWithContent", null, new Content().addMediaType("a", new MediaType()), false}, + {PathItem.HttpMethod.POST, "opWithoutRefOrContent", null, null, false} + }; + } + + @Test(dataProvider = "getOrHeadWithBodyExpectations") + public void testGetOrHeadWithBody(PathItem.HttpMethod method, String operationId, String ref, Content content, boolean shouldTriggerFailure) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(true); + OpenApiOperationValidations validator = new OpenApiOperationValidations(config); + + Operation op = new Operation().operationId(operationId); + RequestBody body = new RequestBody(); + if (StringUtils.isNotEmpty(ref) || content != null) { + body.$ref(ref); + body.content(content); + + op.setRequestBody(body); + } + + ValidationResult result = validator.validate(new OperationWrapper(op, method)); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> "API GET/HEAD defined with request body".equals(invalid.getRule().getDescription())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + if (shouldTriggerFailure) { + Assert.assertEquals(warnings.size(), 1, "Expected warnings to include recommendation."); + } else { + Assert.assertEquals(warnings.size(), 0, "Expected warnings not to include recommendation."); + } + } + + @Test(dataProvider = "getOrHeadWithBodyExpectations") + public void testGetOrHeadWithBodyWithDisabledRecommendations(PathItem.HttpMethod method, String operationId, String ref, Content content, boolean shouldTriggerFailure) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(false); + OpenApiOperationValidations validator = new OpenApiOperationValidations(config); + + Operation op = new Operation().operationId(operationId); + RequestBody body = new RequestBody(); + if (StringUtils.isNotEmpty(ref) || content != null) { + body.$ref(ref); + body.content(content); + + op.setRequestBody(body); + } + + ValidationResult result = validator.validate(new OperationWrapper(op, method)); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> "API GET/HEAD defined with request body".equals(invalid.getRule().getDescription())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected warnings not to include recommendation."); + } + + @Test(dataProvider = "getOrHeadWithBodyExpectations") + public void testGetOrHeadWithBodyWithDisabledRule(PathItem.HttpMethod method, String operationId, String ref, Content content, boolean shouldTriggerFailure) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableApiRequestUriWithBodyRecommendation(false); + OpenApiOperationValidations validator = new OpenApiOperationValidations(config); + + Operation op = new Operation().operationId(operationId); + RequestBody body = new RequestBody(); + if (StringUtils.isNotEmpty(ref) || content != null) { + body.$ref(ref); + body.content(content); + + op.setRequestBody(body); + } + + ValidationResult result = validator.validate(new OperationWrapper(op, method)); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> "API GET/HEAD defined with request body".equals(invalid.getRule().getDescription())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected warnings not to include recommendation."); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java new file mode 100644 index 000000000000..a242a355e3a9 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java @@ -0,0 +1,93 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.parameters.Parameter; +import org.openapitools.codegen.validation.Invalid; +import org.openapitools.codegen.validation.ValidationResult; +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.util.List; +import java.util.stream.Collectors; + +public class OpenApiParameterValidationsTest { + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "disable apache nginx via turning off recommendations") + public void testApacheNginxWithDisabledRecommendations(String in, String key, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(false); + OpenApiParameterValidations validator = new OpenApiParameterValidations(config); + + Parameter parameter = new Parameter(); + parameter.setIn(in); + parameter.setName(key); + + ValidationResult result = validator.validate(parameter); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> ValidationConstants.ApacheNginxUnderscoreFailureMessage.equals(invalid.getMessage())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected recommendations to be disabled completely."); + } + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "disable apache nginx via turning off recommendations") + public void testApacheNginxWithDisabledRule(String in, String key, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableApacheNginxUnderscoreRecommendation(false); + OpenApiParameterValidations validator = new OpenApiParameterValidations(config); + + Parameter parameter = new Parameter(); + parameter.setIn(in); + parameter.setName(key); + + ValidationResult result = validator.validate(parameter); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> ValidationConstants.ApacheNginxUnderscoreFailureMessage.equals(invalid.getMessage())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected rule to be disabled."); + } + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "default apache nginx recommendation") + public void testDefaultRecommendationApacheNginx(String in, String key, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(true); + OpenApiParameterValidations validator = new OpenApiParameterValidations(config); + + Parameter parameter = new Parameter(); + parameter.setIn(in); + parameter.setName(key); + + ValidationResult result = validator.validate(parameter); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> ValidationConstants.ApacheNginxUnderscoreFailureMessage.equals(invalid.getMessage())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + if (matches) { + Assert.assertEquals(warnings.size(), 1, "Expected " + key + " to match recommendation."); + } else { + Assert.assertEquals(warnings.size(), 0, "Expected " + key + " not to match recommendation."); + } + } + + @DataProvider(name = "apacheNginxRecommendationExpectations") + public Object[][] apacheNginxRecommendationExpectations() { + return new Object[][]{ + {"header", "api_key", true}, + {"header", "apikey", false}, + {"cookie", "api_key", false}, + {"cookie", "apikey", false}, + {"query", "api_key", false}, + {"query", "apikey", false} + }; + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java new file mode 100644 index 000000000000..2f8ad8ce5c98 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java @@ -0,0 +1,128 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.media.*; +import org.openapitools.codegen.validation.Invalid; +import org.openapitools.codegen.validation.ValidationResult; +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +public class OpenApiSchemaValidationsTest { + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "default oneOf with sibling properties recommendation") + public void testDefaultRecommendationOneOfWithSiblingProperties(Schema schema, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(true); + OpenApiSchemaValidations validator = new OpenApiSchemaValidations(config); + + ValidationResult result = validator.validate(schema); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> "Schema defines properties alongside oneOf." .equals(invalid.getRule().getDescription())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + if (matches) { + Assert.assertEquals(warnings.size(), 1, "Expected to match recommendation."); + } else { + Assert.assertEquals(warnings.size(), 0, "Expected not to match recommendation."); + } + } + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "disable oneOf with sibling properties recommendation via turning off recommendations") + public void testOneOfWithSiblingPropertiesDisabledRecommendations(Schema schema, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(false); + OpenApiSchemaValidations validator = new OpenApiSchemaValidations(config); + + ValidationResult result = validator.validate(schema); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> "Schema defines properties alongside oneOf." .equals(invalid.getRule().getDescription())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected recommendations to be disabled completely."); + } + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "disable oneOf with sibling properties recommendation via turning off rule") + public void testOneOfWithSiblingPropertiesDisabledRule(Schema schema, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableOneOfWithPropertiesRecommendation(false); + OpenApiSchemaValidations validator = new OpenApiSchemaValidations(config); + + ValidationResult result = validator.validate(schema); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> "Schema defines properties alongside oneOf." .equals(invalid.getRule().getDescription())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected rule to be disabled."); + } + + @DataProvider(name = "apacheNginxRecommendationExpectations") + public Object[][] apacheNginxRecommendationExpectations() { + return new Object[][]{ + {getOneOfSample(true), true}, + {getOneOfSample(false), false}, + {getAllOfSample(true), false}, + {getAllOfSample(false), false}, + {getAnyOfSample(true), false}, + {getAnyOfSample(false), false}, + {new StringSchema(), false}, + {new MapSchema(), false}, + {new ArraySchema(), false}, + {new ObjectSchema(), false} + }; + } + + private ComposedSchema getOneOfSample(boolean withProperties) { + ComposedSchema schema = new ComposedSchema().oneOf(Arrays.asList( + new StringSchema(), + new IntegerSchema().format("int64")) + ); + + if (withProperties) { + schema.addProperties("other", new ArraySchema() + .items(new Schema().$ref("#/definitions/Other"))); + } + + return schema; + } + + private ComposedSchema getAllOfSample(boolean withProperties) { + // This doesn't matter if it's realistic; it's a structural check + ComposedSchema schema = new ComposedSchema().allOf(Arrays.asList( + new StringSchema(), + new IntegerSchema().format("int64")) + ); + + if (withProperties) { + schema.addProperties("other", new ArraySchema() + .items(new Schema().$ref("#/definitions/Other"))); + } + + return schema; + } + + private ComposedSchema getAnyOfSample(boolean withProperties) { + ComposedSchema schema = new ComposedSchema().anyOf(Arrays.asList( + new StringSchema(), + new IntegerSchema().format("int64")) + ); + + if (withProperties) { + schema.addProperties("other", new ArraySchema() + .items(new Schema().$ref("#/definitions/Other"))); + } + + return schema; + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java new file mode 100644 index 000000000000..aae32dd30126 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java @@ -0,0 +1,87 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.openapitools.codegen.validation.Invalid; +import org.openapitools.codegen.validation.ValidationResult; +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.util.List; +import java.util.stream.Collectors; + +public class OpenApiSecuritySchemeValidationsTest { + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "disable apache nginx via turning off recommendations") + public void testApacheNginxWithDisabledRecommendations(SecurityScheme.In in, String key, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(false); + OpenApiSecuritySchemeValidations validator = new OpenApiSecuritySchemeValidations(config); + + SecurityScheme securityScheme = new SecurityScheme().in(in).name(key); + + ValidationResult result = validator.validate(securityScheme); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> ValidationConstants.ApacheNginxUnderscoreFailureMessage.equals(invalid.getMessage())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected recommendations to be disabled completely."); + } + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "disable apache nginx via turning off rule") + public void testApacheNginxWithDisabledRule(SecurityScheme.In in, String key, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableApacheNginxUnderscoreRecommendation(false); + OpenApiSecuritySchemeValidations validator = new OpenApiSecuritySchemeValidations(config); + + SecurityScheme securityScheme = new SecurityScheme().in(in).name(key); + + ValidationResult result = validator.validate(securityScheme); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> ValidationConstants.ApacheNginxUnderscoreFailureMessage.equals(invalid.getMessage())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + Assert.assertEquals(warnings.size(), 0, "Expected rule to be disabled."); + } + + @Test(dataProvider = "apacheNginxRecommendationExpectations", description = "default apache nginx recommendation") + public void testDefaultRecommendationApacheNginx(SecurityScheme.In in, String key, boolean matches) { + RuleConfiguration config = new RuleConfiguration(); + config.setEnableRecommendations(true); + OpenApiSecuritySchemeValidations validator = new OpenApiSecuritySchemeValidations(config); + + SecurityScheme securityScheme = new SecurityScheme().in(in).name(key); + + ValidationResult result = validator.validate(securityScheme); + Assert.assertNotNull(result.getWarnings()); + + List warnings = result.getWarnings().stream() + .filter(invalid -> ValidationConstants.ApacheNginxUnderscoreFailureMessage.equals(invalid.getMessage())) + .collect(Collectors.toList()); + + Assert.assertNotNull(warnings); + if (matches) { + Assert.assertEquals(warnings.size(), 1, "Expected " + key + " to match recommendation."); + } else { + Assert.assertEquals(warnings.size(), 0, "Expected " + key + " not to match recommendation."); + } + } + + @DataProvider(name = "apacheNginxRecommendationExpectations") + public Object[][] apacheNginxRecommendationExpectations() { + return new Object[][]{ + {SecurityScheme.In.HEADER, "api_key", true}, + {SecurityScheme.In.HEADER, "apikey", false}, + {SecurityScheme.In.COOKIE, "api_key", false}, + {SecurityScheme.In.COOKIE, "apikey", false}, + {SecurityScheme.In.QUERY, "api_key", false}, + {SecurityScheme.In.COOKIE, "apikey", false} + }; + } +} \ No newline at end of file From 507f80617db695b745a9b02038040a75bc18ea9d Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Fri, 31 Jan 2020 17:36:06 -0500 Subject: [PATCH 33/72] [bug] Templates via classpath (#5164) * Fixes issue with templates loading via classpath The templating engines were originally written to load templates via the classpath, but this functionality was blocked by file-only checks further up the stack. This loosens those file-only checks, allowing files and relatively imported files to be included via classpath. * [docs] Add details about classpath-level templates * [feat][maven] templateResourcePath for template on classpath - NOTE templateResourcePath is not needed for gradle, as it accepts a string for the target template directory, which supports classpath --- docs/templating.md | 23 +++++++++++++++++++ .../codegen/config/WorkflowSettings.java | 23 ++++++++++++++++--- .../openapi-generator-maven-plugin/README.md | 1 + .../codegen/plugin/CodeGenMojo.java | 14 +++++++++++ .../codegen/AbstractGenerator.java | 4 ++-- 5 files changed, 60 insertions(+), 5 deletions(-) diff --git a/docs/templating.md b/docs/templating.md index a2f5b2335b1d..1f8cad043326 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -26,6 +26,29 @@ OpenAPI Generator supports user-defined templates. This approach is often the ea > **Note:** You cannot use this approach to create new templates, only override existing ones. If you'd like to create a new generator to contribute back to the project, see `new.sh` in the repository root. If you'd like to create a private generator for more templating control, see the [customization](./customization.md) docs. +OpenAPI Generator not only supports local files for templating, but also templates defined on the classpath. This is a great option if you want to reuse templates across multiple projects. To load a template via classpath, you'll need to generate a little differently. For example, if you've created an artifact called `template-classpath-example` which contains extended templates for the `htmlDocs` generator with the following structure: + +``` +└── src + ├── main + │   ├── java + │   └── resources + │   └── templates + │   └── htmlDocs + │   ├── index.mustache + │   └── style.css.mustache +``` + +You can define your classpath to contain your JAR and the openapi-generator-cli _fat jar_, then invoke main class `org.openapitools.codegen.OpenAPIGenerator`. For instance, + +```sh +java -cp /path/totemplate-classpath-example-1.0-SNAPSHOT.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \ + org.openapitools.codegen.OpenAPIGenerator generate -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml \ + -g html -o template-example -t templates/htmlDocs +``` + +Note that our template directory is relative to the resource directory of the JAR defined on the classpath. + ### Custom Logic For this example, let's modify a Java client to use AOP via [jcabi/jcabi-aspects](https://github.com/jcabi/jcabi-aspects). We'll log API method execution at the `INFO` level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating. 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 2bc94188cfa1..0fdc6c6e99c3 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 @@ -21,6 +21,9 @@ import org.slf4j.LoggerFactory; import java.io.File; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; @@ -406,15 +409,29 @@ public Builder withStrictSpecBehavior(Boolean strictSpecBehavior) { */ public Builder withTemplateDir(String templateDir) { if (templateDir != null) { + URI uri = null; File f = new File(templateDir); // check to see if the folder exists - if (!(f.exists() && f.isDirectory())) { + if (f.exists() && f.isDirectory()) { + uri = f.toURI(); + this.templateDir = Paths.get(uri).toAbsolutePath().toString(); + } else { + URL url = this.getClass().getClassLoader().getResource(templateDir); + if (url != null) { + try { + uri = url.toURI(); + this.templateDir = templateDir; + } catch (URISyntaxException e) { + LOGGER.warn("The requested template was found on the classpath, but resulted in a syntax error."); + } + } + } + + if (uri == null) { throw new IllegalArgumentException( "Template directory " + templateDir + " does not exist."); } - - this.templateDir = Paths.get(f.toURI()).toAbsolutePath().toString(); } return this; diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 9714ace95f9d..2522af1f2122 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -48,6 +48,7 @@ mvn clean compile | `generatorName` | `openapi.generator.maven.plugin.generatorName` | target generator name | `output` | `openapi.generator.maven.plugin.output` | target output path (default is `${project.build.directory}/generated-sources/openapi`. Can also be set globally through the `openapi.generator.maven.plugin.output` property) | `templateDirectory` | `openapi.generator.maven.plugin.templateDirectory` | directory with mustache templates +| `templateResourcePath` | `openapi.generator.maven.plugin.templateResourcePath` | directory with mustache templates via resource path. This option will overwrite any option defined in `templateDirectory`. | `addCompileSourceRoot` | `openapi.generator.maven.plugin.addCompileSourceRoot` | add the output directory to the project as a source root (`true` by default) | `modelPackage` | `openapi.generator.maven.plugin.modelPackage` | the package to use for generated model objects/classes | `apiPackage` | `openapi.generator.maven.plugin.apiPackage` | the package to use for generated api objects/classes diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 49fb45efa07c..c03586f39a0e 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -40,6 +40,7 @@ import com.google.common.io.ByteSource; import com.google.common.io.CharSource; import io.swagger.v3.parser.util.ClasspathHelper; +import org.apache.commons.lang3.StringUtils; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; @@ -133,6 +134,12 @@ public class CodeGenMojo extends AbstractMojo { @Parameter(name = "templateDirectory", property = "openapi.generator.maven.plugin.templateDirectory") private File templateDirectory; + /** + * Resource path containing template files. + */ + @Parameter(name = "templateResourcePath", property = "openapi.generator.maven.plugin.templateResourcePath") + private String templateResourcePath; + /** * The name of templating engine to use, "mustache" (default) or "handlebars" (beta) */ @@ -583,6 +590,13 @@ public void execute() throws MojoExecutionException { configurator.setTemplateDir(templateDirectory.getAbsolutePath()); } + if (StringUtils.isNotEmpty(templateResourcePath)) { + if (null != templateDirectory) { + LOGGER.warn("Both templateDirectory and templateResourcePath were configured. templateResourcePath overwrites templateDirectory."); + } + configurator.setTemplateDir(templateResourcePath); + } + if (null != engine) { configurator.setTemplatingEngineName(engine); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java index 64b74e1ad0af..ba17f231aeb0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java @@ -161,14 +161,14 @@ public String getFullTemplateFile(CodegenConfig config, String templateFile) { if (StringUtils.isNotEmpty(library)) { //look for the file in the library subfolder of the supplied template final String libTemplateFile = buildLibraryFilePath(config.templateDir(), library, templateFile); - if (new File(libTemplateFile).exists()) { + if (new File(libTemplateFile).exists() || this.getClass().getClassLoader().getResource(libTemplateFile) != null) { return libTemplateFile; } } //check the supplied template main folder for the file final String template = config.templateDir() + File.separator + templateFile; - if (new File(template).exists()) { + if (new File(template).exists() || this.getClass().getClassLoader().getResource(template) != null) { return template; } From 7cdbcec1a55d9d98e0a888e5d2bed99adaa7ad19 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Fri, 31 Jan 2020 22:40:33 -0500 Subject: [PATCH 34/72] [doc] Update versions missed during release (#5185) * [doc] Update versions missed during release Removed old script bin/utils/release_version_update_docs.sh to avoid confusion. New script solves issues of not "globally" replacing. New script is at: bin/utils/release/release_version_update_docs.sh * Update Gradle Plugin README with correct version * Update gradle.properties to correct version --- README.md | 4 +- bin/utils/release/release_version_update.sh | 1 + .../release/release_version_update_docs.sh | 1 + bin/utils/release_version_update_docs.sh | 61 ------------------- docs/installation.md | 8 +-- .../README.adoc | 4 +- .../samples/local-spec/gradle.properties | 2 +- website/pages/en/index.js | 2 +- 8 files changed, 12 insertions(+), 71 deletions(-) delete mode 100755 bin/utils/release_version_update_docs.sh diff --git a/README.md b/README.md index 25441aa85e07..86b1546febe3 100644 --- a/README.md +++ b/README.md @@ -393,10 +393,10 @@ openapi-generator version ``` -Or install a particular OpenAPI Generator version (e.g. v4.2.2): +Or install a particular OpenAPI Generator version (e.g. v4.2.3): ```sh -npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g ``` Or install it as dev-dependency: diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh index 95d41712c525..c2be83681caa 100755 --- a/bin/utils/release/release_version_update.sh +++ b/bin/utils/release/release_version_update.sh @@ -78,6 +78,7 @@ declare -a xml_files=( "${root}/modules/openapi-generator-maven-plugin/pom.xml" "${root}/modules/openapi-generator-online/pom.xml" "${root}/modules/openapi-generator/pom.xml" + "${root}/modules/openapi-generator-gradle-plugin/gradle.properties" "${root}/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml" "${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml" "${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml" diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh index cfd66070e95f..160674acbd38 100755 --- a/bin/utils/release/release_version_update_docs.sh +++ b/bin/utils/release/release_version_update_docs.sh @@ -103,6 +103,7 @@ fi declare -a xml_files=( "${root}/modules/openapi-generator-maven-plugin/README.md" + "${root}/modules/openapi-generator-gradle-plugin/README.adoc" "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md" "${root}/README.md" "${root}/docs/installation.md" diff --git a/bin/utils/release_version_update_docs.sh b/bin/utils/release_version_update_docs.sh deleted file mode 100755 index c6b8f129218c..000000000000 --- a/bin/utils/release_version_update_docs.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# -# usage: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1 -# -# 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. -# - -if [[ "$1" != "" ]]; then - FROM="$1" -else - echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1" - exit 1; -fi - -if [[ "$2" != "" ]]; then - TO="$2" -else - echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1" - exit 1; -fi - -echo "Release preparation: replacing $FROM with $TO in different files" - -declare -a files=("modules/openapi-generator-maven-plugin/README.md" - "modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml" - "modules/openapi-generator-maven-plugin/examples/java-client.xml" - "modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml" - "modules/openapi-generator-maven-plugin/examples/non-java.xml" - "modules/openapi-generator-gradle-plugin/README.adoc" - "modules/openapi-generator-gradle-plugin/gradle.properties" - "modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties" - "modules/openapi-generator-gradle-plugin/samples/local-spec/README.md" - "README.md") - -sedi () { - # Cross-platform version of sed -i that works both on Mac and Linux - sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@" -} - -for filename in "${files[@]}"; do - # e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash - #echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename" - if sedi "s/$FROM/$TO/g" $filename; then - echo "Updated $filename successfully!" - else - echo "ERROR: Failed to update $filename with the following command" - echo "sed -i '' \"s/$FROM/$TO/g\" $filename" - fi -done diff --git a/docs/installation.md b/docs/installation.md index 60105c9a9bcd..ff84a2de7717 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g To install a specific version of the tool, pass the version during installation: ```bash -npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g ``` To install the tool as a dev dependency in your current project: @@ -80,18 +80,18 @@ docker run --rm \ 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/4.2.2/openapi-generator-cli-4.2.2.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar` For **Mac/Linux** users: ```bash -wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar +wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.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/4.2.2/openapi-generator-cli-4.2.2.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar ``` diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index e107d0956f91..f386781447a8 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -84,7 +84,7 @@ buildscript { // url "https://plugins.gradle.org/m2/" } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:4.2.0" + classpath "org.openapitools:openapi-generator-gradle-plugin:4.2.3" } } @@ -649,7 +649,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' - classpath('org.openapitools:openapi-generator-gradle-plugin:4.2.0') { + classpath('org.openapitools:openapi-generator-gradle-plugin:4.2.3') { exclude group: 'com.google.guava' } } 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 240b76bafa8f..14a68fc42add 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=4.2.0 +openApiGeneratorVersion=4.3.0-SNAPSHOT # /RELEASE_VERSION diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 698cec53814e..155ebb7b84ac 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -185,7 +185,7 @@ class Index extends React.Component { | npm install @openapitools/openapi-generator-cli -g | | # install a specific version of "openapi-generator-cli" - | npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g + | npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g | | # Or install it as dev-dependency in your node.js projects | npm install @openapitools/openapi-generator-cli -D From c8cd255ad31a704615640c9ecea87950578210bf Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sat, 1 Feb 2020 04:03:34 -0500 Subject: [PATCH 35/72] [gradle] Add recommendations to validate task (#5183) * [gradle] Add recommendations to validate task * Use current version of Gradle Plugin in build checks. * Fix gradle project build version confusion in CI * [gradle] Bump samples to 5.2.1 wrapper Previously, the Gradle plugin was building in CI against openapi-generator 4.2.0 and Gradle version 4.10.2. At some point, a contribution was made with an API which is incomatible at 4.10.2 and due to a release script error which pinned the local-spec version to release 4.2.0, we didn't notice this inconsistency. This bumps the project to build against Gradle 5.2.1. --- .../README.adoc | 6 +++ .../gradle/wrapper/gradle-wrapper.properties | 5 +- .../openapi-generator-gradle-plugin/pom.xml | 1 + .../samples/local-spec/build.gradle | 1 + .../gradle/wrapper/gradle-wrapper.jar | Bin 56177 -> 58702 bytes .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../samples/local-spec/gradlew | 51 +++++++++++------- .../samples/local-spec/gradlew.bat | 18 ++++++- .../gradle/plugin/OpenApiGeneratorPlugin.kt | 1 + .../OpenApiGeneratorValidateExtension.kt | 14 +++++ .../gradle/plugin/tasks/ValidateTask.kt | 40 +++++++++++++- 11 files changed, 114 insertions(+), 25 deletions(-) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index f386781447a8..f7f22550b4f4 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -377,6 +377,11 @@ openApiGenerate { |None |The input specification to validate. Supports all formats supported by the Parser. +|recommend +|Boolean +|true +|Whether or not to offer recommendations related to the validated specification document. + |=== === openApiMeta @@ -521,6 +526,7 @@ BUILD SUCCESSFUL in 0s ---- openApiValidate { inputSpec = "/src/openapi-generator/modules/openapi-generator/src/test/resources/3_0/petstore.yaml" + recommend = true } ---- diff --git a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index 44e7c4d1d7bb..5b9bdfe705b8 100644 --- a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Thu Jan 30 22:14:34 EST 2020 +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 6346e2c05d25..213341d8f110 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -96,6 +96,7 @@ clean assemble publishToMavenLocal + publishPluginMavenPublicationToMavenLocal diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index c8c7e25dc0bb..22a21f46c6ff 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -28,6 +28,7 @@ openApiMeta { openApiValidate { inputSpec = "$rootDir/petstore-v3.0-invalid.yaml".toString() + recommend = true } // Builds a Kotlin client by default. diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle/wrapper/gradle-wrapper.jar b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle/wrapper/gradle-wrapper.jar index 29953ea141f55e3b8fc691d31b5ca8816d89fa87..cc4fdc293d0e50b0ad9b65c16e7ddd1db2f6025b 100644 GIT binary patch delta 50261 zcmZ6yQ;=p+vn^Wga#fdY+qP}nw*8fjF59+k+vu`w8>jF7@7a6b`!Hk8^^g%6F*7oA zj2wB_0y;AR3a%gx3I-j2hZ>KCj0_C~1PKWQ1SAM#ThGTU@bAVSFCdFd6^u@bhEjxf z=XB=;4D{ayt?X{^xq-aNAO_*N6WD++;R@k zs`RDX#XTuUYQwZH+>QNThK8cu`DPA_^k@d36g9*4zW}Lt?Z=gUK9Cft& zP~4edQJyEK7AH0>MEAUg9^F;3T6A6DGHuOup%5U8z~T(3R`Vg`pO842m(DJqA(<#T z6W29wK678cpZ+TI9}X7#P_$R@+h zBhl8m4|mw?1+iK3puTD`HF7eqJYSxkHxeV?hAq?sxwo%(*uYr~902z3U)zs8IPk^( zo{BaFy7~QJ52c>#aPD?1kRmu_yK?}~(akF{pDW)(%{Mn}3L0NiTjiRcDvH|65h#0| zZ3z{6z0^l1R}5JV>kM*Lhi$C(!Fd5I>J9hX|JURHca&HH(^TSv0|AjhCted^{(EE` zz=kriI>ryK^I9EEI3ra=V7-te5HfwUTAf-9#T+;-ux-;i-8f;Do!gmN;hfb?bvMsT zKt^CsFqwhaP)!Ur)kJ5+o9Xxu0Clu08WGJzr(e~v3tvc1p(eyZcih#L6cg(4Kifco>3TXCEOX#&1`%AzCPm1Se^nL{{_rUn)?;^Lh4DmI0Ur7>-WtHlm&lsD3@nEn(3 z-~GMAO&ME5 zs9mH?7ilmSVuwz$4eb;2nnoKO5ULU6Kb;Dj4raV|G*%RfI z+{;^7-DZU3;>1>;aY7wymu?ExTE->ap{dXunXZ4_f~^lIAa$)CSBR!{gtq*6G6#Pg ze&~>$qxFu_F{_TuJ_(eJuu`8)V#qT93WAn9z?~RS<8Ve@oR|IttimD#Fe{Bv_Dhb2 z;3mQb4`!I+^j)Y?YK^1hbF-r^%(8Xn#!GuNexvOR2OZ_32+yV@N=LOqRtIlD!zO_t z-8Y_ak`@DDb3)TpNxW(Vz)h4F<^^&?Uq>1PRU)mR_yo$MZVviR&^5bHT$HHbT2Fvd zA{Fd1`^Z&OX$2~6D5-)2^mnDf_4lmLi@X+?LsgFpdZ2sy4RCd;u~?#1V1W;{!FToo z0&nj8OD<8vY<9x~@o$L-=cuU|9{FkkmiH|ha7UMx*dRZD2QLW{ zZE_cD-aiwj)5m1PnN{`;9i=B05gb_eY`r$lF-V)qwW|XPU%U&4D}~Uvrq?FxH1!($ z;MZKR9e-O^4LX-v)@+EHyzXYZijs2V?nN)?%QD@oHoA&wt$1$}TFTDg&o;DbDbG<{k#rqi_~X?X6krCKhgJk z?$KGj`2h{cvS;~#?1z&8*byZWD~ZpzmqE8j${A6py4dCcyr+I3HwwS0yb8W=W2pv= z11t!-5{rmA^*z*EBDakDE&h0-iJ$t;E|>k#Kh_Axz5|4l1pS{o^OR4EoaqI(!r&kC zbNx7?iDO|!Yn49P9T7<*yM^X=h~a*37NHB!ayW8}xTSeZA25Jp^-;ynO^dh8%p(*S zAIg$WU~|X;x-t(BWV7;uyH%x=N4X`t7z;$|uAtsYhjR8qgZ~7Fi@3?Pr(tfFmL} z;dK=!|Mi>Z4%)On{H_^3_Mzl9DY(;x$hIJ9ixDzceUV4Y}v5EOhPD0P$aeZx3GdqRj4%;RoezwSWqM@AXamw94@Vz4G~T_!}4sl+E{ zd3j}I|Fb0J6BHGxFY}IutW@e!Q3A0>9mNVX>*D{VfDYLAm9BGZzu-SwAShZaJcJY{1 zS<)AO2B}d6;mx1-T@U#S6fKd8GpZ49^RzHC4(v3OFtifhE_~ukb$=Jt${aEk7BZ0s zrAjdY2_Foag<8xzQ(F8%x8qC$6i&o4rD6A*4p9)I*hk-mXpKOPFK=0Z(?<8LN3#c|B;i`^JlW=_T6K5Al3N88%~^DP26}W-Z5E6@+AwFSmmV3I;1#Gt z`fSiH?$SDyQjOFqo+P#du3|5KjZyX}Gwi3~tfQ9NayO52?r1APq-!0d7)DR#&mF(X zatgO+Wf9tLm$bNEDl)sw+hY8>3kfyjWOVsroy^Z?B{>OQVOT@hM;sq~WRdoYS@Ey} zr&;cdR;aMY)RNK`d#$-YCs~8eJ_No0!g+cHiFr-<(?i5FC;wImz!qO}#a3^Vxgv22 ze`d*K?Rxp0PtUNb3i!~yl=cO?!cHr%S-FLFNoc(xkeX0%J~YNyT=--)aylbD;9U|W z(6o$PHpC$Ld)n}mQrA;>*+X80KNp7Y2+dFFM!7Fzk$DMmhmsJvMc_4trPQhCS`+uo z)#OnXvh?V;Oi{ZGpfEQ!t7!BFe_~ur$DTue$HgHw+YA22gO{9v@qZ zhRUvZ1qn0nhzZW2uS8%(qZ|(2`91p7dGI^4oMJ&w^0GDReD&pU+cqA`$8$X*iSTw(UO6T z%pyZ2GwnNL0Bps^eVjqUlR5?pQPu|tf5O9Dn%WX-`KzAU`G)f(hnxN3;^ie52yeeU zM3Y9duHM9mGX@o=wLW7+3+uwmdvpNeT1%pjwcc_cPxw3p|NWd)c!2hjkpw`ksLP;J z^PcbVmy-wao|hkzVqc{Y3*ou#@yQcKrlMr0WHUB8)@uWI872STT1PaY-w!!dNDXA$ z4rU;!BHqRWZu}zPwj-fcOUSFXzz##CtH)0-Z;D|D(JJh8OJZfz$q$98sy*bK{5#z{ zUt!xsVQt7aRMp*Tue#xSodZC{NTUyAQs-6}TNUxQ=bG0!fyxS>jVX;d28M@miZ$5^ zRl8#c!In^#r%o|gJoS~`alq7HE=9&>jb%%`W6T&?9wYL{Jsq}P+1MN@N;%VPY-Gqk z49>pwuiE|}L$z5^v0xS6P`Fku2*m{i?4yA<#KA_WK0uM#?8sPfBo#oGuC@5kgy;@)l`rGP8-CtygNoO38T(P@fs!B+>X@7;;&1QG5u@zQ@rIN>x-@+7VpDy{!h z;+?a4WDGs?lG+^>YfUrOPysbbi3piH-SC% zx}(JuML>R8X}@f_U$>j{|8&cLPax=hg7{b8TL4|$0;qvS9J@0b=_~itmv5~hdXW6_ zdu#OkgdM+1B6gs6D_?Cvdy)M^cHnkjZkvI&!*%jHdZ$}||e)maz zN&->eP6P4z^Q%q*N<#VB@6ds}@B!tay-c?aUf-@j@(0?$pK#x5Z~%2#TY&vOKFF*1 zXJP;Vz;<^9#I~pJqX5A2$NHrHru8qqy&>yC?gQ-dCkNk9O}N8-rZyaSTfN$|e#T+- z)P|}r-GZ`CEuaNZA_?TGr0+8hTZhy8Z?)M)=E^goM3tK@!zO}(giFLwssVA9vlh?% z@e;LSFiocv1ifJ}@f1)SlTyY?UQ!LMVk0pDOkgRmU^xX*vO_QsT*$PKC)Fi%=A?{G zm)I~Ip((RvG>j){%UUv-HX_a0NJJ4%z+8&+Uw8u z_k7i_rgw)?Y!o69-;ygC8&8BcZC0?JdM5!3x@>iHW z<=)$PlN?lTl?L66`s7BJy#r2NM-QgvVx-e$kd>vio(tPPw6@v|Ig)W=;!GE31{UTF zUsxzh*3+yJa=ESK(YhGLp{+EXWj)&^N3TwAqEMQKlyQIULy226T*m)4#kw#8@KIlw z4~@6onFy+HeRk9Mf1!tEOE!;9!-;0c7hM!3x&@AyE=GVWb+%X2WjZc+k7NlIGu;WV z%`2)hs+M+G$TM-zpHOUAZzfrjcVr)?aqE@zVNxa>G9c^Fbaj_kEllY!nXtG&@pRk7 z7BN@Z6ocoete~=_e4dSWBxjLR zljjvSZAeBCniqvrxHOfti}X4K%$x-?JHT z%l=j(v8&1Y^JaH3M#@^0o`~W_m|Vi%@44^N4z0$bnuMs(1We9Zu-ifQqtrKS>MTu~ z!Jj-%Y~f0!EVr46XQucIU{r47wW`QFGD8O<(V1Xu2yL%2m`P)@t2MTt74pDAzS<1- zx_K`=gDaJEg+{kq5Hfm8W@fPIO1?pkx=V2aw`Mq=?V&fmNV>( zW_F8ISO#mqXxVs}htoh(FlTgy1h3&F(m~5fr6}x0bCztJ@bxQe*UYKGe znZ|e%@F}p7osyLb^Y9v}ovJRtBB-HA-=d!-(S$IZNPP8S^VhAE40nLDuy(e}G!bR@ zSoUH+A~S~w@H_)`aWIdT>o8%GLzj{k=@v3%GJw8+{fZP3XFf2Vggs+IPOjW!NFuY2 z5>M{qv0FyB7&X-AQ`&^iCEAPk8`fE4kVlx$-$!6wu2FRQ&N#UUZ#32e%vACJ&pJBNiDD^dmut#h} z`l|b58u=D)0B_a$5TptVHbi%KrFWj7j@{k4oC|&Tw6t^`7%NNu?a@d%Pew)H?T`Oy zoh<8+Nm746Icw?;jS@Y!WPHI1;c@2j$!D)4Xo!@CN_QcCgQLJ2Aw?uk~ zu%N&LbU3ri{|vRqdvF!r^pdZo*hz`E4sp7#>8v!pj$m6=_&g|EySlJz=B%*7n9Oua zK%A-OJ{Y9@J!}`)(%S1$eRI+mmp@URtYA`~tj&Jw#8hS0x4V0m-XZR~DtXdf`|DC6 z-OV;d&CsnPt)o6q(=*#UbXb1=!I%>vv4n;1H?g(V8 zso!%H&yVYW%U2nhp7nx?3Q4aXuyt~yxu7sni*Y2djgvi<-aE9OcrlVX{ArPWJ29UI ztVK)(I-u9AR}gTSJ#~^74RM@q50NU`8BhSQ0MUEa*blGY7*v^QVq2&pvOXM z{7tI#TVB){7k+Zx=yIt~f)Du|1uSj@ik*rl9ImxT`7@;CSFb_PsYEIQVZiCCM!7@? z9SjJ98#zWjK?G3A>L4VGq;3*@0CktVF?sJKdpu=5QjZTld*cW&e4vNf1Hw4?$J+cp zxA&S`n?%*Ni+|9Y(!^PeQAgF%ECvg+SWhtTyt)K`uDx^fOA=%=n>tm!QkL1u(;H@_srYN5SDq}a15o?>RF`zbw_vLT z)5We-mngM))>F8;f8<7t$Wx2~sVlZeFQ_iPnhz6BNC4Q>G9rB4xNVJ{3}Ih*IP#3- z%E@D&smU$b_7?}g+7#>=d&)PJIQ&t03*Dzz$*vIYor(6;B#aY#YN`j8zFI)gX=0hn zyH*WR+Tgw153CyOjKL8BD!ZJqD$C)lp=)VtJLzGzSU92nqGfPbe={L~I1F288^`YQ zk=A-Z+N`vE+io4NY+F&eyO8Y=CY>|*SF5@@FWd>$%8A2+cilbnDq7QS}Rx;pn@8%`DggtwYO*f*zBi_TaxB|C3;Y_1FHT5Ky`6~GlZ#BkV!M|!>& z=FY;b4;26lo8$W69oPxSXqA|zd61@@nC96IZB3DkBa$vf3~Y2RiVuP-6c}d|l9{Vt z6OBAAD^X^WvJ1EL4)%KVfg=c=Q6w9_CsNS|&iIvU|CQ|H#dHDCBfIV{@quSqyIWOf zJS=S)XO(&W`a@i_4i~Ii)srva05TE|sc8 z5kDG$Zvw(EvXN_u?VEP`Y@=ChL#f#-`j^R`uIbhJouDtn|5D$1y89kVx+k7g=gW`>-umeO`0!dD!aRdAWL*|M~jD z2g2#Eb>WFL*UCH4Yz9nOdB};Q=r1|QiQ~+c4W=$#cZI@Cd+6E9ie@QG3(|@NC-2Y63P~jvJMG%sC&vK&pjn zl<#Cma~ZEHP%Q4M6I?34MMMP-!QGN{H)gnd9_cb$h(>yhIDQjL|C9 z*={-=mRniMc`Y7i(I)e@8mu#yn3p?eV?3eLSdGVaZu_`xGe@;d(RrG+({x|nCI{+P zYos29n@;u%2?ErpkV}kbq~l^oru_*R(x49NHmmk85ad;N8XCd>QmXLEbNRWAHQAch z_j>CtB|4{?^s7%CCN~_>G7l+sm~@7S25b=)3U`NqFFF?KLcuabiY8OEZ*!BG6{1ry zH43qQe8=&FOi$>Q6&2R|F5I7{SL#^3$dsO@47>`rgaKA;ve#V1UA4A0SQoX4FrX0* zW$kFjo!S*s!fvjf`W{_=7?Xo3cW7wj(vAdV2LH192oJKe`bZ0yznQGHhLaCiOk}vr z^qwoe4E4F#S^tjpEno_TcX2L8eptvQlOm_tP}8uQaA}OhC3W_cgI}`~<I4Fe!p!9P`|ARxG6vS@JQ}!H-3;= zR;=z;BMBH3wp*qv!Tl?b&SUw`q|2tdus95Xu?RrdrLQK)=#kj41g#AT^)oO)Dh0>u z!lnTy+D-_--xr7Qi_XRHz%pm)vfG90qWqHvZ!WXmou(G>lk`9!ivSJNkfz5(n>!9A zQ`@Y=W%J#11Cet`@yy(1y318#_1YfL>ZmnH5BrIvt~tjoSR2*i%M1ekyou}-^U>L? zObqDUfRBdLlcD#xRw_%-$cFmu!!_obR`o3Na%@=;f0U%Te>5ZW;ugeRGq;Blkv_F@ zQH|tUSAKWUNhrD7*TUN-_`5qM6)hsXZaxRbtW@>RQ${1%)wnVS9$`jRr}KPrv80#4 z;m0jjF;{M;8OM#apmTI-!N;Cc=6t);=`Wzvly@GQm6`=2APv{KD`mU498S-9{VU3`Lt#t%@IZgfa~v~baOH^;3wG#o%5 zJkL}d8Ub$P-r}pwYcXQl?|wPVNQWN|K54p)h)+z$CXoFIR1tH86+~@8pJxabyG(0~ zGZ}~S{L2+7giJZZM62Zv0==K zFWwtsr)i#w2p#E)qc{werlRNf4Gus@;GvEE2`Kxm0bNSu@}G%eFhY$gd zx$R6N6&Z{^iF*1H^u;p>^&^(`BSfsziZ6Vx7<{iFzh4ya5=C>Mpcd}PC`Sa~cJMCu zlj{?Gq%P9&cYo0wM>QPmVrC*yMAvGFVm-R?KF|$+2$UBqC4AzEBfM2ey0eG^W~;>& zl*MD7SSIH}coalz+eNAC?@It*obk}S-}yI)rR-R^n-^=JgzRTbPc}hC(BhqHR%M>NT(|_oV4kNw*C$oF%E{alW~9eM zaf_?=5OJ_=L6=Y7ghCUW;vlCC}*sr%wt|!}QK!$uW6kI%1OhXq3 zwg=0@|BvPUa~VwInRrGZ2q1Bb4p>T(hDMR1BxxD~UtfR`Eie!u(n%61;t?g&1P`hw z9?dV%UycGRlkmM1?k%t2x(JpgKsYosdp^9J;=I`6|MB|P=##y^jvo4E;7WHg#lgPSlsB2hf#9f7*>mocwKJ zgN2}VHNea4u;n7!X_p&j$K|(PSC#v^xs92& ziNVTg#hKJMu!tdVfVGvji)V8wrU|oGi+gTsHNIZcIdy<3$!6u1uDUSD?6p_LK%)Fh zeMUMmuJP8OO?;eD0-ZsOA-6)KRoAb#k;{sWwnu|! zpK@Xl8=!{p>@oNoLWS9Sj@q`%G?Wn|8RE?(qb1yH&jJFd?TX#H3gLbr#i#I&iqrH#| zVczLZ`e4{LVau5t3}3*u5|zQhR%LWiCgWSC1>SZxru{uIWL~@~A1;@!2rrux;0r^+ z7`X>@*-sp41&HwnhE<9+fQ-Ay>;;?lx2%4`v2B0aQJ_bhP^`RFm*ooEgpAndCMu|+ zhM4v}7^pOHqoywC0cOzIx$CQHg$ zdOF8NnN@J{i)a9=)37>q-@@SK4Di1u4v7DTB6XhdcS@0PPkShjLLPVJnLPBhwK{M@4kQi}kG z&dE1o&M6lfZaloT;oPj=<)oq_X$Jw!s^0Q|&%PXh`*kTG%~X2)*1H^){`4ph^j2At z8qw1E6Gg9l=hP+CPpvxTGG426XSGRfc#}A2eR!*d`f}h3{ZD#;{pnE%9l%cM(HI%x z5fusUQ5o1;u0aEQJqikq_jqtcHQ*5z>AtUff3fA{5r?yVF)GSWS6(*sarg=NqT=&M zs2DTQ7>2}Cx?>PS^^xc|MZIto9oB6-9}PPSjeEUQ1jkRz#ZQgORk)M%sesNMF-PGc z;^e0$l>ElwqYtAmdnM{A+Mj%l46LnKjje^6I$zybK(pj;s4exqiJ!U7z7p?ne{plY zL4p*KJ1u=GY0JT}IIpkPa54Y{^)0C}r#Czmb?e8K!UZUdKes$@r_@MzYr~h)O*WY8 zt9#qWa@G24HIy3}(_l8T!z6`ZKf}CgP5VhzMhqp4)VS=Y89tql?uV)@M4#V%b)Y6b z(9D}7j3|Lf6P2*eu^60vIToHp7bC!7swsyt^X|^Lo!67Z+>^diGcW^u%9c#TJM7>P zYiEo#1*VDY|I!9nr4pO5*+vb+)uQSj(u!?I5^hOherlxEnzP_p zTd^WT@vhOwY+cC2`p_^pJO*d~5P zb-f~>I7zm)=Eh*va69bTR=}BAuM&D=DhZKZ z{d6=dUZPF?Ejehn-r5>v9q4q7j_5r@YWrm~gLfZ%k7S#=hV>VqT+Vjz%Ep|1Y2QjS z`d!Z3g2&sgjPK;6*Ut{77D66t6;Yv0)_f*LsNy}j`qFxRe>pt%=s1*xe@6|+$Rj$4C}+tLP)haM9J;gH3gXN&b)Im9g-7z--yBVQ?eXPmB>?s)QcmdV^6u{n&(~dFpcj2Dnr+PjC;Sh>wlH~yT1gc^_ zl;~@^JUfTr+SP_ou*tg@%93Y4sYb7hW9hFjTAUOZGN14{CV zUHCUNE<2!FVTGJ<34;GR)xOepRlb_ISfT@WaWR%vU*{-Wkwk) zu;`Md5!XT$3p?L#Mp}S%WLkNIrV$&n5*R9@II=UTW6l(U5Lm4@Me)=dO~e7yy-wi~ zx7^CK$0koBy(iQ7;41G5K3WJi*)ykLz?P8{J$0!~$=HOR!kz2hr25V#-E$*rzfXwQVD;_F=vkwa!nQ!FWfaCH zTSRq6*bsbePJsnI?V40a9>ra#6|suaGC$GkBm@He zDGjh-;IXr46=j;}_8Qu!2ku%$?OB7CBroo7#Gy9#D6D6BKsivomSe3)`ZwM=>O{3< z6+8y-&#-MpA|^_zdLviK@sNAT!jO}aR;vfjR+{?pu}nw(BV89MwaHrXBzKA#rm&;# zHhLAx+uty9R9*V1_i@`|b*qtbxoTJ0(s=;eB+G?p=2;IAS}bL*kwkTxZ%uic`Jl#G z4_(*=-kYA|ji}FgQeJE=lKu13ipE9G^{kG0UyAd}sB`BT`;1fr?SVF1feSqSUlX+e{j|Sb#3b=0!ri^_JMt`&!Y1tnw#z;WANqTbs zC2XKz&6MTyudhjQ26ee(R&_e;{!cU3GPYPFLH#->ltAO%5&;Vg_BbO${W<<k+Xm^JqE)n3}w0$E`mXcsPK8Y`IIZHy$n-cQv9Q;?E2rsMK&54AXyj(glb3FCNKn zQGQ*&BprxYW*mrYK7T=qB-dZHv0<2_4@>)Ca!6MoPf^7E4kWmoAY{F7&tqboQdN`- zOk7SVdp#opgA7>WbxC|v2`R_%Be+Vk!~V8q!oO1Hd@Pq_(4o&<^gUI5 z&1+2+MxQC|KXhoMe`C82E1W(-gjPAjQ)qT*#P?uR9_&T)DC?Mlw8QEvFlx9F?9||6 zYv*Y;3th68I@$Bg>bQbfF{`F`TW}E!tV~cYK2qQho-0x2aaRBIk9;s_BY|f6q}I3B zR@Iw>X@@$Fs&bVb5!wJy+c3r}mf518qu`z363ubh=CyHQ0qKPsND#k1D-0*V$_#Pk z=XrAS7zW!T)?F25<&54#`2Uacmw(A&PE!#6ke380yw9d z9o^|1oaRuqAQ;1pUJIrpHFHswc_XhxYV*qsFDYVY#(CP#X|fEcq-#ol5dK4_?a`f~ z{Lgv=rwz)!+P^)CP^83ddP;zXrw@ud>d$w>C`}^pf`SmbMW&XGGyNV_@Su$?oYZTu!0_*7 z4MPpZWsJE*_Onp3y1aurFOis2wcrzM@QHM?lF}@;Ei{d!%(Zue^?BOHzicIGGSd-{ zZmr0RrZQ;FQ^H<6wv{sE3LA!NcM_Xw#-V7K^~)wojl{lsI~f3Zsn0zlR$k%rislQi z1*iZi`SkpZI|+o}X^uvaT*6*f!%_i9#Z66_l;W(gB^yPV9gU*9H5qG=Fxd)LDcl#N z_*Ny$&EDXj)oRgQJ$1tD%{4AY3XLyiK{#O(@bHs*%PXEax{nW(;7M+aBzK`1QkE>; zRw;>97A3+Tl1Kp2@`92Uj<(3__-1&^c|)jN7gPCK9TE%9wYMS?88@VHN}M+%SaiX{ zVP&ZecRPNp<%BhiNvLJK6`MGpo^s22l}uJ6tQ0Kb5#RwWDc+)HRAX7kDw8lb5oX9Z zmse?)sPzQl&SXGj&L{SeC`&+n@>FP7^Nb5|hx2V6n(5Yq*JE2bmu2RXZMNheb0AZ37Tb-CGZC%vh^m@kUZ=R^mcopa zA|0EIv}l3Gt!ON@$h@U;PGL2ffl^eSa7OSA$HYL{)hYuR_SwN0=oX{QK(!{y)d1M> z3H4$FoK65(3W~6cwidflMzsORzotF75#=wLwMM_WM-OPO>Ma8qs!wd@?87?xtthzu zKq{&axPJ02E4cnBC-_buJ1I}WuC|9te=8&99yfGP)D09^Mnc6E#VenmfY=d`Ku4wK z9s=p7M1NfR1^H`va4zL5r(gaqk6-z&x`#~v!7HFSaHsBjhe$5XauIgg&}{(UbF(2X zK9BsC8>(0R_SdIkf8uLmApZfqhz>|vaG4sl?NEj6WVu{s>&3X0RG!snfgB4|a0e@^ zX*w;*Q?1W#@7@h`&OlM$g5`~CsjRrXg|g6^x=V2O<>65yDYYg2NOWIvW1!gXyR^)_ z&K#hzIBLSpkV|1cUC+Xug-RzS`ys(vF()-ePlqy}&C0ss;JBtQG$FagBqmES*N0Vy zXTa(6vL$+Wl4FZH6l z1!qpjx!ex?DargqsKNQdV1j8Ownf@CbPT{~#ZpmxTA(GVuIe+RuCT{=tdQPlm8oev zXk!J#`NqPztvaR6l~U{(Wt<*%nPW^TURb$Vy5{x`ULPfQJom=J8gKq&wbJD|lL13m zUlt56q?BL|vFGVXS)||}#7IYhGG$7-B)_AMw4>VHBG>9Dy9b)z@@kvJy^>+>Y5_RI zaM!qNgINJ_FsDyj>%;9SV~7kk94?jBo-DD==(N1z472Hy$j)@rpkQO|`lmh&>Dwa+ zrg)*;dC_=mpplyN39s>XYm7=W=fe|vSJ|tq7~h#i6)A`hT~bMPOR~z`ap}wgX0HQ| zab`5gb9tjv#qIV=_`#d-UYHL4>jh{reIZ>CSe14>H^7dk%XD^8J z|`=?POMwjdo1jNS`7ip;^&d=LyRjz~mzxqMMW=nEAyIKs~| zm%QnoPvRT-_JeJ4lRv;zcM>4Z$WsY5St?_37xty8Xau5eCP`gO6gUD~LskG=(LHUg z;j;>Wn7t#sd@0i1NNw~0q1M{mI)QEi8wg--lQTfc^mOUYJ25RI)hH?oO$rWjk(te? zDsXTBY4#=m=1xz>8Ox&!@>&t+U$+^vOY*eBmfvkj5r{v9jCiCm*#jg~cbC(1+tMkd zjkZM65`|QjLJkCE;qu*!^MVH>oP?T`Thqo=lGTOo*SE}OXK_Wje(`h|;jqgHg$EH4 zCOk6UxHG!4*Es%!DF!VE->?RkHlOAreE70plXQ(j?GOjw9|YfULv4{m?UX`o#Ub_J z6HoCu=TRzul`rBY_K z`@c=(8AwCd2~+h(4O{U;_pV6|3KGSVn_7Uk_1UYR1-|kB7tQpKWdg5-x%T;|jK=&o z)B~nX+@r?>NZL8O7~0qfTbLSK|7XuKIcZCNQ2}Elx6zfF8h2Mjvh)^cqmEx>fmduAi&kg(58V^&VkYrFObf5qh!K9<8kY>~r6tn7717ONv#kb=;JSnEj0BehT|FY?XwE{DW z8h19p=e}7&-y({5i&Z@)O09FfTqSkNtrw$qc1H#Akc=L@>B^1}>|3NH|C&jM0P>r` z28FI7N*k`%Oq8q&fsdaLtp`>4KAWYY(3b7FZ0t7WAmZ=zd(G|6y{>w@)#_%o(@wmn z4?wXtH+?0j#8!ErPLE^9kbikm9%mLRmubpX(2GTtv~e#$81I6_`(;cBW?uKLN$=>9U_}wFv#4t zyhkgY$x;PNb_cD&=EI*>GCU%)&D03;FF+=3EQ5i;!U##3YX#%D_H=9r!*25Sk73c( z)%10Kop9*gkMRC z5Xk^}Zk2?|23pugi_n}1bA%DNEIpW+HF28kR9v2q?jcLelV1BB`ikA<3c2YJN>{?o zBm3$$Bc^}xQJ#?TH97`%7hW~SLv2br{%T25eRdEx3&o5yY{;F_T~NlX17E}55%0w- zJW(Ba$NtJg`x7@}a!8Xj$KKYhlrBw|EcUrQ&*(R?)yr9;DB^nA|E5O&#cbmzVqFmm z5Rd>Z5D>w?ki`Z3Crtmzv3*pQm-)#XyT)%yrm+*ss#`=IEp-((0$r;kVN?|*`zY46{#GnkG*@e*U)40LRjRS<{B*H1r;{K6 z1N8mIyKlC<|EaLwa-C;8J&&V)At24md{4=rIK;9528%H1WNTQ68|DusnU(ZF{it>o zq2t_s_kNb;e)5PNk4Q1k%pP!3OoQ>uA0B)*MUhJ;*4~=%!<|qH>F3?5;G@5v`Ozu0 zt;!d+4ap0)-Yav?ru^kxm`XO=2I3kU{qX1+FlFlQlRvo^ z!sO`(j7AmxWaP>p4)f^|F&`1VDiK!QD&x^V+(|Cb&mK$Z?fqM6nTRV*hF1TuNixsQ z()y&t!NqgtOp}p|G*$`mHEw0r(%}LtP#mQp&HgK zIEz?mBb>k0=wxRm>1Z?7x-f{u*up{p4Usqg=L`t!py?; zr-9`yi^BCv^$~3ae9k$R=ZgP2OSsi-NL#tF4=&;>`iYbwEnOi881s_87| zRN4CnYas(Jdr0x693tW|(HTc5*Ci&`XVMbb?K`c4059%El8TB`shw z#2=E)Lt3P`igN(Ki-%ASu*> zWO@YD$B8MCVL4tcyAW+l&=wpa=mbLjn=zk`7HUJ)eyb*ZoT$O*@9x6lZc@!ZI1ESQ6#Z$JJCU)?rPCm z_NV{D)jI}f5_Rw1NhY>!+qUhAZQH(M+n(6AIk9bfVmmo`pL6QG|MOJ!uI}ot{?OG` zd#%0KwSE`4^)N;YFqCT0w86LvV2flI_-r?(TMEq!I%_dFvmi5rvF`POeA^nLOuFTZmNr8a7Sa?e z9f&(-27-?kJ4uu|rgJk=Qg#<967)v4L-u^#7btV#b7ZXQS-fuiQ*UztfH{&bMieGG zSBiNST-lQrd9DCb0!@^O1S=R?A2=y=zd4_Bn(_1>b$SP|)zJP@CJ;lX5W;z)H5|md zzhVSMRU?@4{*?L-tSc;DAAZXmlN8VuboVa|iURYnyjzbE&WQ(qiMUL0?{%oufchp> zsw!bK($fB4XURnUiAD|70Aro`f;woZhCAkTRZ$cqzMK`^RE;ZeU3iS63zgi-^WIK4 zsUGD$JZOEersWZ>brvU#g(i@Z>|@&87lNSj_Es}dayCp>qn`F8a#h6n_;xKVJN@jQ|`)tpnfUekd2j#9~sME2R-vIkDS{CO~!eCeHhTWVLuQt7n2rPY`83N=la7-@_JGHP3j z#qS;USBMXh6!$xNKuB#$8bP@ao__5eoDZMXD1*>Dtf5=sILGajBGGS=V4tbGAu>uI zl`p29z_yv}DM%v+{~8~fosv7d9^E6J7kLx>6KK)BPL=IJ0i{>F9*HAw&sx^!avyxo+`w#?t@ig^k^S8 zC>6i>PETD=8W!^~yA(>myE0>i#bv$y(jfuld=ADFV^Q|HB}P)phw ze3;fQTG%#=fZdf)sMom<3p|HQNtC(ups95=zBbL3LZRPLO_ETEHgFkJ3wMRfVF5@` znNyh&;t2ANwC|;$+R>QknU_MRbM)S8r?gT9&RS0R;BeBPD6m8MEkw&f6F4SPiY$a$ z%wQn8%Wh*w{o*9(0lu;%NEiyM#jC7JwCS4L;7U0u0I>Um*Etn>IB8p|-%k$fX^&&n z^^HIov}rj*>Zaz1z%^^-f-W>ti@8d@W8YvXi)Dh%8a2gH872*r!5Zk)q(gry8;pm3EqHF=G zkCyT48vu;N?%cb#tXq%FfZV$`?j&9LQq*m(m&E zSL--IIL7xNLCNGst>o`l5-HbjG=jLZ^8nTEiq?b-EDmSs=ndtebtm;_+X*S&v7edQUxuN|UV6hZHy|ht z4-MRaj8q2iCR|Lr4A<+t`xNseXY(6r{}Hr&^rBb!$dl18wRs;8(X_9`Yj&DOD^!>9 zOQv)C=xUe^BtbLy+nTAV1-}Oh*-h^TxWER6hW8Il1)uY>;2hi=Hu#4`@3GmZ7qn}A zkXW7)Pd_)Gm!WKJ*cY1JN`wV<6x#M0#M*Hps=kzRkq*UHxpmJ+*qyWd$pX4Aq* z=N&P1Sn2K}Eg|>7LDl&#gUxgMVRO-vr1R@Rg!919{V$kXF%UD=|yo59n9kP_>Mpqy{n$ z2~BXE#$e=|OIS8HyW6Noc%3`nUz!oVCBmxh>rZtuH`G^M)wH}l_MpvXbd9**P7&rA zCn>_mfZv+5PFZ5Ko002h3^RNIbck&a%<(gufaYr3!)Q{rD8+D`6ON^x*P1>RFDnvu z{YeqNEiUKADzJnDx^R@}3HXaHl4sqH9wVl75^8HIfy$}Vt?|l7AB(!j;yCL(Q`BTd zgaQU9k56;R5*yPM-L>-WWlrs>PhQ9`1+KbWygFbEo$RL$uuk+;FS#OO z(TNV48t3?x^h)=*{oYhBfiZfiUIEg`9~wuEP(*(T64regkCUyDl*6Y^K?5imlNbUB zN#ng=qzy{dAg(MGeLJQw)%T4@tJbUG!fEMTuaP7TJ0gJ1Rkc=I@xo@)R8LH_!C{VU zbO{QTSbOah!r3kF(-?;W^pKWGZh-v-2rF7M##VZ!B`HY2jvMUpyA$Z1wmkA6#6RgL zrCD4rU1>ZxyS)AlGSw%RqDiF4qnzSW6A~kUo$_-3N$&}1rF~;R8ubOsbw0cs_}981 zrUqcr4fMmbU?{#W_{86yhJfIBlM2a6)?F3*>c|EbIV+b}exB5elp`u@t*c*=V zV>hj=?=d$Ojz+l=tASf`;z3}M&vA~AESPlQvV^cJbOhFrHsp$ux8#ae(4I>jIvKh^ z=!PIAm~2p0;3^d!5q6*tts-O1ED^dpOU<6R+?scyFQ`1jmORXVeeit)ZhNt0 z|3p-CGPEVSEFutUoSVJp?!Z?;v4q|7r(oC$U$U#}g0jBhvp*j^F`A6afN>JPD(xGm z$5vHelq#&$b>0#Qn-%F{R;b}Q2gm-6eB&~k-hQR?{J3=uz<}Vb(V^sWbAR3#!egz0 z)rze>FEYs3&pe-a1nYvZFF6w_=h>ZloO(O<%T!Fo8@2V4PKRFP0s|5LDcaek13^N4H;lm363pAPan)nqLjBD zEs{$HT2kW%M6H+M8J__Ar)leaq{Gb8F)FiH=W)5vY>D$LaoaA#Sa3uK&-PVpoWWz7 zGjeW8xeMju-mC|q+1)@cD4g1*yCS)DLn!DyM4jrb!*Fat@RJ>$foG`aJEM;OKJ^R1 zHwbw`ig^zV-51Kg^$91ZQTd{RyEsaM|0ioyg@fY(5WNv@8~Cm3Q7(H3d}+@|SfczMC^W)vh%&cz=;7+4{2ql59h zB#f~Zpkzo=jw4$mf~s=5TPDH^Wp-|wDv=jtn~G6a3@RfwhN7aUu_?tezDb5` z&Eh^s+vlKWJ8d(hTvt{y9TULC=9-(B$!*_92c715RoEW5?>YPS(rsCWruEVbf^(Gz z9DctSUI%1k!%UhR^5qfkOf0Gi4Ww%)mWN>sp#EGOm;HqpCNP*}k`&p*Mt#aeb1;@9 zs-OD!;7lWZ-RMLN01wUZ;+Iz_+WKRf?<|HfC83xim8w~ngkGSn0k>tI5-x)<{n&Qw z<=ow#n`J57mvf$@St5y;Q3@9*S~ZmM+2&R}#twckU(4foYLc;PO%#$!pU$o~rx z@CU($q5s|~Jl*LQ_HVvuD9HHQ11TRE7@?-t9GX3B7d;6|?zq*bm0$QvL2@C0QkPuj0a9*Sda+HgJL*?Orn*f9HBs_4NzWDXT5D2E ziG6DQ%aw*A_7FMB>c`%JcOcT!*gQrcJ(=(oh0-=eOa1d;iE^=KULM+>)CE`aG@0RzzDmy}Os$yJT5Nu{!!uZel zE4eN{CmQ=bpmX}6p8CL>`pwZy1IO_yBE>=vsc4PF4RP^B5|N;qceSa9fSPwh$T6?` z$STIH&>G8P>$z2(_lYXoaHuaahVm^2u%Sq2o9;WTuI z9OQ+!7^vt`9yKkDi{;vV%uTf|MIQObUpo{T*q*{RCEaRE?$_n16&z*U#Z`|MyKR!t zpGVXiz6K2G+)$Bie;06gm$OfxSGR`^$1fWNoH}d+k~avmonoQ~0K?(=vtc%ZLD%;z z)C1Ao< zB91q26;aZPeM?iW`Z7V0GF5lgzV6SRK*wvN^3{AN`Kk#GSzW6Rl2zi8+tPv1q z*&nZ#GKYiH?wYBirQiKVPIqywbQBulzenKR2`L zbx?L|TDSTQ!}{k_bnn$H9i3EJ4ZX@DXFXdAQhP0$+G?~HN{66d1kbs~he=akMH%XY z+==MEj4b>z8am#1Tx$eUJ**T2oNJ~r2r;_LFF*)m4;kp{z-SciW?c67M^|0^gE@WB z2>bo=!v^NtVNBqrw}|;C`44h1_w(uxpQwj1vaESJH zSV%2DI7EXV93tm`Fcj1B41mVUGqrN>j;sNTu1Hy$A(_&Q(FOp<;pG7WZto;+6R&}qbb=#vZ6jv5=@&FT`e6d~z*AKD7 ztv3V0naqgA=zIP$l_LVE$MuUR%lR{l^Wa^46I&?_n=%!Agqcib017N=a7-0hB1(Qr z1clTJBpL16I?=>R1=pl%DsrHLCH12aaeAiq_Ed7q>kOiw_G-fGRoMy7Enl!+vZa%x+s> z(anX?EiQHSh}>ck2T$*uK} z4VFY!L&ol*Ao(bNMIB@?@}u>a-ey3$_^1_`tNO?v&qz2R>&Nf4M4qVd5)5OIgzw21 z`e-Ki5)Y~m&8~>Pbwt_+-^wBNq7B0s`tSr^?{)@$8)5Fi9K1Wdh@ml1adPWwEZirV zjnz*johV5GNYYNs2r@D?%5u098y{`9HE6M(iU&e1Jj^DA{~5B_&x)Q3EimW6KxZBV z$v}gkgwQUnm~Q`uKxKLz$=a)9cOGMu$gSp!&htFlbC1a#}1sSv1LCzhkc2IX~^ za~_$znuX-D1SJmM^TDe5%sJl=>XGeD&YA2>T305MYL)2$0EZ(P^~r+3wHNKiXZjDD zc+X~=6Na;5SLx_{imer(;=R2VxI&eA=i#CZ7U|ePeuZ+AsubIWHEGkQFS*a%f2kx( zYc8%j0m1~GPZ~MvIxLZXKEh-efspsHJ#Hk07@xwHtuZkJa>iB*OjU_EPyR>ZGKMb6 ztj4G6ff$1Tza5kb2jwW|GZA6JJ>91J=7Q~|l3U^l!65`xQ49BMDQA>J=%g{}>6I_noCy}7zb zw(Ywh+TjT^e(P0iKU!{qeg&-L2#v?Xxc;^8Tsb*JcT#kVBNXd~^@u997iph=q3^6Tjo zx{*!Br;jxrCCZaVrpn#F%bI0O3)HDO>FU%ZM(;B&X#@H<9icpB7G;s0?x6HPeKORi zoU1GVw#^}ZO#(lbLtVPY?-&y~?I9d&H&UU(7n})I>I0wXB@7ms`UclQ>P_OE*bbJ) z%9R*4^PS}`{r%_O!S{*5+x{RhuM5Eg9Czy)mhHM(1nQ`7QU*mewf-BPjwineDHLbu zPX28E*(4lHt-CA4jr5T@eGlAWY`62zoL(frz&3~A1`akD#kT^@-MZ+y@7?m~(d1q( z!TQ9&JYts{dN_i#2uwAR>ZtSt|qlf2y^9X7-GbA(GxidSQlBHUwqZ{m@#HZKA5 z5NAfEkh{!EuK?pFo~dtSsUsf%PeN5*d!!&alZu!FIa78Ou?v6QFIUYkX!W^< zpiw8ZY8^|oCb2k&Q+S86yza=@`+nW6!grUSL)Ws*kFqJqcp~D;z`ZPT`ZAM;57IGu zAw{T(BmgD)A82S@gyBlF4E|ZBbt}`*O`X~eEIl)Z9ItDV)(K`RO5Mv_wz0AWIp(+o zW+35Z)1Hzvk=32)U69ftb)P4pQ0Nqzi>jkf$yJ1e-zrJ3FJXXrdRrrXYp{9Yux;N_ ze%pL_3vpX>5!>U^h;%c11nCUm>5n{4x3a8v%(R)?xeNnQW zIkQ(sU_h9czBprhj?Go|ZuiEOEt0&_N~1(Zvt@w^=BH+w%p{Mt$ob!fs1oG^=o;j) z5x^(L`b#s}4hsKOBQF)ZH)iQOvq)lQ0E{mv!8-mw7+%%>PuGWo2h0a1$!}J#RiQrx z5Ba&(x!6JYyb)+dpmQOmo6_?h?ZGmQ6UAWTy-2G0FnE5QFD`m{SWufL%-kA6`((i= zwS|^ESaKbe@a;Hr`JI?GMkd+~CuypzL%*Gztj~Qr)AlE`Ai@RYXDKB2rAn+q#EP!l zx02ZQlSY@3#poqEUV8V?&)74XbHvwZT8DTa50XHtA}o=3-uOAg;w%~=TYOY zG9UeZB!10Td4-vPot(~7+EHO7yr|`jI zrke;%DH{t`EKiFeISB~dLFx~VcR_P;o=Z3HDbNsmI^CaQv5|5YuT{+wz{hKv{w8Z@ zEY^zAl+r|>qzOgWUA7jQjS-_qVQK>QR!Yl*CBMFIrG;R>u0>wBvG=03JjZct6NNG| z+nAIo)jEY7OX^xWPvgL>Lb*~mfFiCH_kdc$H6j^S+6;T}5jtjjx*jT62aChP!d1FU zEL&HXnkc}I)15KP5^IH6t7rU;Xm#g z(9xE_%0^+%0(dyn5xDmXXiI5C@d_x4rEu|446X10E(ObcTFzJmG*HzP6GtTX%~_#B zHSy(7G3VqP!JSjjGv6jqf1+FLRC@87a}S61%&e)k7t3&wbXRPE=qhcrTue_T+qsp{ z*{1YNcZa&^nbQ?gvl~bomXGd|XvS9)!$=6p55d_~v_&LG()rNNzF#~CnbTq9Rw$ez`vHzP&N;!>7t zSfAu`dJA~tm9%_9F)3_!4YzA8ITwk0H$6=%2MM+na_45sAgj%o48H8GiFCuQ!A7c3 zx1^@G=3il_%BJ{k8oNGdFDztz_mFq`aJ%jKev!r)=4=)x3Zv?Qcd&GZv4MrP&-j0@ z>5H-&mf64oNChe|Ko5Co#&~bD3aCLt`Zvf>A1yx%RPP(v$K$z1irZ*xf zqY!b)VEW6=&^35vWdQoPK7{dTw|kmWTfS=ma}HwtxB@BH{Lxl{#TIYQl!TuK1qKb-R2S%{?QSrkA_ zlC1)Y5aNh={=@o#w9Fq+9}qN4guNnYXksWyRarC>CSg(#f1Y5f4j%W%MPsx`#&(=zxn%hn^?)dp;Xl0sCcTxBd< zE7f!NNk37LuzQ8yD9t_0<22K+%SvZtxdO_6F$_F4C{>K73@PrIfAyLW>T+wiYCdb6 zH|x3)y5^vt?XK^a;h%A}qD*KxU3|cgv^K1@-}%VN#@d~uNRj3cG&c~S47L%tkm3EUpAXZ*5j`g$HHe;wN@@J>UYtUJj9P~ zx-a27jYWn34%VDc{ho;{L$^QKat=Gtkj)k zdEl7((>H1JP4#!u<^#2fQ9ju5&YO}zOgk93$ur!r=pY`}EQ&EyKrj#BfT$CObBZP2 z`j;Hts{$@vK=9j*pOzjJV?V(8))o_EAMN6*(9Zb{^#KNzZ&E(*Se`Q<(=`GLb*_7M z7-iKFjg&k{mRjg)fDcVl7M!YZ_ySlMK?FyET8I_PL>$UVAFg1G(7CMq0cZ?5o{DTV z50<$Wl&V|^+%#Tnk@is*XbdX80hyF2h*v!@-6}p9wjnaJ8K2M-n7JBMYMfA&Z1fkK zq%!!L;8YeqAs8?-ij~G>exJg6?On_$q$_dtYF5TF{m7~%E< z^^Z@wxAX=ROVGo5DkQk;Aa)Ueb=Xj5WnIC81L?ZxZ^2-y< z{Q#zFAH(yJOwX4qxVG+XhGh_jxx~{icT8cl4Nzvl(=&cpOC@=L9Hghl7^DfNe)EW^ zmpoh7%frPvyT!!1y0yc>%sR`GhCqnekY~wi zZLac_oIrJfiZKPkdr#EG4|Xy#+SwICaP-7t@^si4O|{*SNEGQtPQ^Quk0yn9hv=Y2 z0`Mh6bCQ{7aBVff@i7>d7kc%xGhasRbCvhz{dMgdjsJqdl^?V@;d5Lpn!HG7qBj(Y zvy5qt)7IiHZ2i;Fgu7)ea50$^SZZL|VrX`zyp?X5kbU4azHP6;nz@`DTs`M>vq9vR zv-}&ZL);)ho<%P6heq4rrEln@(hA z)6~2ep+|SJUAbm#0_R;D{D`LY)@e6L1cj_y`AjOda+aLy%!gP<0qf*5k(1HJYJSEw zHUEs`DP1)O5(KLm8Z0&k7wcbT*NOn=;w*S))-RnRtXe=R26o4MJSr-)G7mD33us_= zAu_f)3#OnG7EeXiTp^Egi=W$C)9H7Mb)R?%jZQP^lD#5Wv90wg!pTVn(-Y=>`!}X0o4^9(l2~$TZq)Av;1_EOTmVpO6G4GvZ1@$+e)eqImBc)qnK1En!W73{E6(AS!|c#ewh{KBq?%Gm4IZPl*sFSZ`w<2wm&>o_-M6* z=c>4U)~dLot_cdX;Fbana4d^CqJ#xdx>f&>8{Sd<`1PG!S346O4iJsYX1<6Rh4LMb z@Zc{kjb;*2kch6TrQ&c3N;C{n&p%XIUY7U%P(E2mn(*P|G|VW?ey;qxaV?~wqFIH! z{L*7@x)tbU=9)Z$ozUc2U))iXf8wIt_~{+e+Q}Vpx#RZllN)bLE4|jo09|52pYyn) z(j%1fzAUn^r{Le6A7C;CF}slCp1X8{#v`g(u;_zM3VMs%=n&UYdb`t+6248wk-dJS zb;qbE1j7o7JR@`V6)b(`8q$}?#J2Pox&W5+j>DtaQ&CbDRfnJaqAwam!{S}UyG zI4Z-7bLw8o4Z$m-G0rWgEFW!_5yH{~UUjhE;gJ@^84`Y`zzqGa$^X1`&QK=|G^WBC z${umH8Iuwu79fJ&w7d!{JY)2VYZW#qy-PNUQxi*8E0{C%QAtayMqj8ksv*dNND|GN zIeVP2^e;03wM!XA?!katxcL1{*k8WHxKTr}4+hF(&XhK`Sx=l3y*Ijp)6yAVVOYD? zKU< zvdpDTF}o~N<;WN1LqXM z6m)~KWFx`}VaONaYD8Yv2m^n}uA?^%@oAU$Y6u4PJJ`X{|4GIXGAu-<^z6qBLG40P zs)|#j0uU^dR`5>%R9UV+Nr`NsS1q&9WxSR*<|h$ithBHrIvMgFEv#PQvZpks&$k1& zb!kX&G6%n0xK)-MBxcSDZX@`Bnv=ali4`4odW7Dm=k@1E)T@$%oUgP<9lPR~qZceC z`RiL%Huh^DmKb#JrUc8T2c8Uln>C6q?8M=@4xnL|Gt@FZ`Hu|kO;G|mnfXWE6PTsx zik|@uIBjG8Lr$#S-~_)BHumfJVOZO|F369ELGbLLT@JJ<)np0dsHR}?P^G$9k(N-( zFi};(nPf`tP-mHh*hTxyjI)-LF}ew~@Q388GDEcgGAijD{*YPFVf;|Y0MQEHIy<=> z0?1a`RMi|A;l+n+$B$5itnK^z7a2_KG}!{4Lx z>#1!GJ94NP2+gJ#j!OYOG!j{aGMs)~5GBJkVa4SJR%1;Hn@PZWoyV5`C8t%b&YIfFD+^^M;5~XMpRiPcaLx%$52|% zs3VW`#51GLq!&vpVCY6C-N&a8IIMh! zo_~?-9~pfx06yg|W0(BCRuxojQh-yKEOs+cN5NgbQ{pUJDXt zqs)x_79Mfsp4IR=O*nHc+hCrybIp$0*T6Q`DN6Q80a)PB;<~2}#fKR!LyVXaW^PTs zbV`d=!o=rXC8~sT3Fvd3p`{sOBr}Z5W;088jb`=Qt<`jmif)j1Du=AAD6?v8BV;<8 zNd1W#EV4ZsxkZ=jO6F4P2?biXnrC>3P83Oq!RosOa8AE>))uhE0=1|)c<%A3@ zq33HH0c|B{6T|yLV@x{gg3!(PB|2aiEkc`-{z6o2#A8VZtbzH*hn%!aD2L*W78PjH zH0H6edZS*MJu=t>vC(0mhPQ$o6?vw-1$kyufyJK0Wjj4hI6R`rd=y{rc)yS{X|i}i zugD6kX+u8%XzHDb(m5~;5>+Ob4TU(*viL0;0CO@8J10op+ z@5y9xX{ty=ti_w{UPxQ7WSg>Lu0AfAn3?9SOpd~?+f>QVuoKp#OoJ~`Z_sSZql3#H z05Kj*CUeZ%XH8da=kvOP&-iWcn$Yzm!A*+eg>Zh`{) zL;~T2B(XnCx_ZIgQ@Ek@jYyCA9f?fIW^Xd zAX__KGoN3X%X@Jwm#*qkTslp27fs>{0rI6AJ&k*kJUy&J0PN6y0cK1FPizL{l)MZp zlz_88eSSqD2!*WRU@Xy0HyvmoZNU@%q_;hU#}VtiW9EsTcJb~jkc<7dn0ef6Ntwl&wi`qgvHiWn@ z_`e*9-{Tl}N8S)H$;JubRS>Zg27u2T!D<&xQ`;- z2iph5^AYQOfUiI;{Ah<_7OWyqjjcuRH;%De$CVhjQG2HM=-yDyNMu~Eou^&*HxZQ* zzW(}0ul2^q?-}yI#}r^-=%o62tVRT9ap3<^nEq`By#(^pLT3J-D&|}~UQ&b$ zJV4tWMHO=^sU(LrLod9^GGFJA*ism$xhb!DQ;U8`Z+00y5^}*r7NR7BF~b4r+WiBf z>!qaYhLAo$RdeDf38Ci|;{%I6t!>7HJ7cqGA}sqp$GNAmcjHU`_!;2$1=ct5LLP0) zNpawV37l;$Mv$uI2y72?R)D!3v5QDA2DpKyj}l6$#}&fH!pe+xAGBcD8i%$Nlk|dA zAIPqa3_%*G;2ewSM-|cA>>&r25f=)j6Joz_u{(xF<}RrzTUk<>TaH=GHj9(C$XRIQ zTB6s=4Bkp9H7+jBKW-@J+L(7u2t2nxN)%Mg|KU~1(SQHMR&Z>MK1|aX7 zkrtxOr(SWA5NW|M5LKPb51B3jIKQHaT^ zthAzMDL!e^90@3Dbu}XoN~O4o~YdrG$Fu2twT>ndXE_SN@%HHIhb3c~?QLuc zR&g!|>z~Mig#aggN3OGToe*_}6dd=qR0bTYEsL&5FJe5B+wXv*S+8kYEz8Rydaa61 zacjjq>eVQaaeQ~w4GsVpsvyB2t3&JUQ6IJQ{nC}AIkj34p?S> zgS=fit%u zZSTc_wKvUyJOdBY=EY?Lw`)f~Xctevt0{dP^ zEWE-E_9a*aL}ffB8|^I(XI)Ft|z70mE~jtv08wd8@H-7y@8KAE3} zEDlQUMD!Ss&op@$<0QS0f&?H{q25%gU=O9^m_^b!c5A-81r^3SHBhrZbL%DFWa(~@ z#jmuvV@l}6b8td%PDB(*#`s%084OIj2{2ILmR%)gVuW6#R^W!Nt{tGAlo=mmN*J02 z^9WNUhl?*?f&zTpz|Y*qPn<@ZN%lPWqFcN$MgDRsVi@D1&=2FGPtW-Vx;f<;N4B4T zz)34l#?@Ie5fxcHw2!P_gzL`PMUF{?r~GaV3GJ(0Myy=uFL+=q?Zmnu45BZ!8f7CO zmQaYtDSitj{EWfRAgBPojcvEvI+kW^X}zX5VqLzc8vu+==fur+rsE>o@!dqbHxe80 z3I&Qo;*d!qP?5q?NE7PCcb&8pg(Q9#|J$l+H_ol{oenV)l=Zw5e|X34Za=+J*tV|G!Sxu z7(dr?jRPR0e?jD-M%uvrTQpK(h@m78NE%;GMg~%ZUn*+PgC_pl)A0a8AS-Ee*@L|gL%9B4 zdA|j%8|D=GCg$gYsb+gk@<(hwycuCw7II{<1P#{Fc^u=o1B&Cj}KFDJe;WC&+N+_~5vSkq8Wh8-$C%8A=AqNGvo!5<7y6 z6{>aKtQP%~1FtuRW+)uWc^2o9CkLitvMjHd`jS(wAE-lHQM7dZ&-joMHcQNJ=)n`wUIp7(}hjvDiNK&FKVI3qO}Cx>n6! zp0f=eZeqcPf~u)eoTt)VkAXTjdevQg>+u@YnT;Y1Wg{sT(TesFLORT>l7d+40v|1E z7cbEoKp^CSFd`AFBQKm0E(&gvknA3oNS3x0Cb%x1XMXM3aH^juUlTqB^geYB)QDMG zye^z9!LJ>s?7Yr#5NGIct;!F|%}g|z*!*i*J~cVn*rCZ(n~E@FZuxkA-v!0XPW8D6 zv0X}~oUzCP^r(aYQdLWPw3xZ0rn8b_G~`89K*1n9Q(4Y^#n7x0KaUw9P*%Vik@#}1Pi)U$NruS08C->kkSNnj1GDA$?cS^^LrQ)1;?}xY-Zk?he zENem6P53MLo9(=1;6s#g%C?MobWKY;vhMa!EXy9J(w{`f;0y( zKpj=4>|f(H`DNV2=bJ$ZZ}K;!+?ku9-n`+U>$057uYeo+7v*TuFUk#}tta{-vi#Pl zK4n_@Dud_TI=>A!jW%R-e;aT)8}upKFvzUdtqAVWr>(JF^z|_~p)K-p5g`hse!PJ* z!Wx1L4r1J9qJT9`Cr%0FfWb@Hx**s^BWOx?J+sK`to>7B2eaQwJP?7AM0O`_8^fpl zrt1=8Hoy3WwIZB@p0fC%+`&Xg6*!bn!#qNY8Ab1aE)j^f?Wv;Qc+*Sx&Xd0WYi(VO zC0bbUQ+6Xyk_Yeu{=Z7ww>Mq46J1joA-_6k0F8rxB=NB54G}4tT)eo4VMCKSSNB!M zW&R7&2YpYxDB0X!gxxUaX}uYz`NUtwnHSTO(_dz0?so6@E3E`TW{w;Fu}Z%zqg|6& zYYHt0Bcy))u5*z+Pd6M@>GH~nvKm8TA5i2jj+Gl~&!me)%ovJ+?n&iHCmG&(nORYSUw|Sudr< zmeEDqGm^Fes>%=7(XqUEk%UguO;4@Ir^=d6f5YM6jp7*%VayGyom_{!n)BB0M+hvL ze2p8_|F*roEl65aX;yL5f&2u{LDGV+L_zFyk-4N5*ctldeP^o0F=9>i&TT zq5-a(b+H9@CQ_6-k(!t6@s}a;VyaqGT-;YLn)I#6S6fA&pNuH7Y8n+!%2p52hxdH` z=}c0{7~-qj`h`^^#w^>+Nd*fwQc^^N3D1np1LdYyoCPA=L6I}ef5$CyzgG12%;K1E z90+o_@Bm?91Ty?z?$$*kBfG#qTQylQNz?HZN!EdQfOF*yan!G6^eU35zisKkEk*Eb zz&`z(i3VAuV42#E4q6mVq5a~L3J4?<(eD2mgB1f+gq3Hi`qGAvCU_c1H@yL!u$}6Iv)v()P^?QmkhsTw2z;LA=_zHuoTvp@#kP zc!#Sxo%$H^^a@*ZN4{35M(dA_!~~+|9Kj+T;IqS!?ZT*W^KL9}lUZ&{tGXg4RK8A3 zA+f$D_OwXImS9~hd%BSkc5$kpTFY%O!FEwDb_NrCs~snb-S)1TD+5sGS6fn9p(%x7 zJHbfPEs)#XTrBwEqjgDQdgO?b*`_z8>yCe*D#^Qtf@PnH2HzRBUT@ntKI*ZgSZO*u8274A7UmKy zyFWb8F#EV|BAz?7WdFz;n*D}r1Or-n)g;{OtbCWh$7Iw)yu;is>v6;^ZIah{H8s!~ z6Q!!hP!bp4V6B4Hy2Dc6yWp&vmvhAlfMt6mSs~q4mgPSeaXb8%Rm4I-6Xqza!_3*I zQcz4&bP8VWV29u7PELLsuk2Z%mz!e+oX zh1UBGKA%D)AA1~si$7tf|MM6-K-N2Wgz`0%rO---Jru#Q=jf3EbXKCU2c|q(vH|a* zdIS)9jrEo^)9?F&7f{7Y{28FR;`s)1+ypxeRm;0IBuM3>{03Jl{iSk?CCr2A z(;np@)s=vqphvXh`43lmmJdeWg+-JtN-1>^Q(HJuS3Fj?_}FnMzjqfIuu)iR43Z?O zJy~LLEP|L7P9nuGA(e|-Qtm3p1M&Fz18nB(_$KN~ExDgCcl|S0i2o-mre7ih6#v%!5tpFy zxxd#dwkl7AMG}XrS_q+gFqH(C$;oCe#uWuW=i~j`bxWJHivSFL_eC+JzZm#D5n$aO zOkaTqiCOQ9oJ?>2Xz0A<%>@A8H%NWt>@amoR0fl@T$^kYd^j@X-8O}0#zVu@M7_m6 zXtpTK6HB_nEl4h8h6Tj{pI4vRog^=b3(st-*1*^sw-B}CZ1ToA8Z_i%9O7g-fn>ij zVpr0Q1U0`}qz8l$bfr8f`Gx0VI}c)5vLD9;u#S_brc3m)8^jk|ALgG+FN zySuvw3$7tR(6^I&&b^0w-@o2JtiATEp}y*xp6Z&~-Bs0bKeuG-hdH{93cvxq2e{yw zdUmyd+RBwpDwIWx)%b%pUrHpE>HU`WCBC?<62Z(;PMfvZZn8q#x#%AY87?Aw22(+o z4M)F7@o+A60O@8ZG?PzzOAFQCY>H^V2Kt{36^}?};C^Z}iy*+TAMVD}g+8{2E!-?6 zko`FF_Tl~j@UrZ568^4dPAmc@GJl;^w&>ghKxJ|B_+Dl_d{*u(TE zWZG$Si>YJp5MB3PPRVG zF9M$M{p4jsry%R2lAlO|P=P4OBw*1jfY{4~Z>C|`St$^*07VhjFe6xTn8qFi;Q<)Y zSZJf9-jLo8r6_pJBdaX1p(2{WRDtfaL0J5RJ#6mD3fb^RT)rbgLh#%BQ63!x$ltKr z+TLx62|iO0zmySl4*WpV|G1Ds(MGzZ_GX#D!Fl$;jecEH(mjir&)mpj)e0wl9spFe z(W!%4AuCFg&nk<+Gs8!Lz)jIzq)uSptmYPnW$dGj_$lA4mRg+KH+e4>+Y?Pc9_dzUh$&HC+prV@;oC%!fEO#pA~}vF;;ey+^^c z=xC5T3|a;`e2)lA--sJ24|Okjzs@MyaZx*{)M55IV@L>;(3IsCptnb_eB_*VI}`fc zKUBN9O~`2{GJr~exwK|Oy>b!eMBQ5yRocM%F)iOyH8U{}344+nB}no_L3B!e^Fe(k=8i zg^IYtseOrEgqt-0IDj)_b>%)Y!(^b9o@yY9g_f)fe7TOMPJVJ$MXkO>o$BCM3u)}i zPyQi2HdE&$bD5S5g__7;=Du+4rSW=^{eX{ntCVe|oMiX0=AyuiJd;F2gK0dpxe86> z%jF&a*;l-D{3Ley7NC?9J)4rnqjXDq@bPVn<=(oA;W>C_JRcwi`>4y218dg0)%Ixs z>1aRzejy3>(1V}nMVSXz1X;jQn^%Eoc;~K1h0eU%z^ZK~e{dnkFbgB%&C99Q@>1f% zeffAF?Ygd6KYfY0W0NP66K|uGAA7;d-UMlOq4SmK3ZXcQkzca?5Aukfk9hrCkuV7I`6g(ETgg(ATMJT< zy&V2hiNRJd_`K)RCq*uZ?H}q;Dd>p>mcW}( zR`qs8tUYSrYfj%_e>|2MYN=?NY`i45G`hENhuf2=z9-%79-;6b)#TMAc!pGdfuhe4 z@88TQuIBgAP4kkqxBP*ij$wohtL+g(j@8;&Vu~E564z&0`|MMWZazgJ_`d3Hs$ICg zSimWex&e@zV!bMF4<=@{h|&guy1C*LgnnH?<50Id8oIIHEK>^uQ2W0EQ3WPJ%{dAcn?QE2pg;}%UVn0Dn!%<1a!RXo_rf? zP_nCY^MHAC3W;ZycEnRlSw%ML4tP_ay)cg&dnyj_)RWty#9qSY&T{QecUD~Zjy!^( zhvUP*)|57{j%pv-Rouj}vc?=)RxA8r#r=E63kuE%Z#~c! z$pMzG&vax^fu<~HOX-qlpbz_6^#z);FNK@(Iap?U^G?J&7!W~M+1axTY@~sAQ_75V z2@_6coVyBsXgL6`C^q9jkQD&qPZG~r3FDh$F6*d)B9EgN4c>RI+|B4Nf2l6 zBx5D_xyS@>`>`#qeJ{OwJb#otD=J6v7aTU;HN50NV22j#%{>(P4oRaQjweoR)82E* z7bD^o-IPS-_~?90k~Q(oRftFE5pLfP7!c)DB_Jp3D**hFc$`}wKB(ir_LC>?>&Pnv zIcnFy@i;{QCN6DQtn7znh+4#Wk`ma7P#mgsL*{M`?1i!PGb}s4yvu02>)AUIwBSB$ zUofG>%e98FH!^QW6V5VML1_&&r#YRSz7VPX2{Dk4ya_{8Qnb`A+7fVF^UF~Q5e|tv zsisqz43mx@2pVxh4DPOE81+;tJ=fT9ql!gRYd<*w7CH1nn$yYf`$KkJR_Se5)N78| zGj!*yl9?eohsok7A{-adlHGE06HcMybd1B)vUvB{3J^53#}QRJw(&W$GAns9*7SE~ zls(;Xer#wbo((yTx-d+`#EsUXs@G5PMOJ33O1BIP*`^jqF*Qjj)z-UtXJFef;`OU3 zB&;d}Y_mv4OhxzHb}4&5lOerZXnoi6{^8hn1eGpk2|0Ci=wLV+Z&n(9n@cn$|`f|_}< zv|BEMQyIy2*KzK|tSF-450PauH#s;>D!9cHkots2ZW&erJ3Y*7sUR6S1)!b0K^eyO zC2bM?6f`FMUFmAA2h0mOODZ$BZn}%WTq=NxhCY9jCn|WVAEj&$zBSCp>IZuZa>IJ} zG+>1Qao?ePe=0dB(;Op*waf4sIE2s60U0XusPKd#DBKLV(VY)wTp9MDs4$Ds{IwQ!V2elr|87ho- zS$EK{ojp}Z8No7;;`V{oYX9ZzJtw~f`Yd1pD%4hOXWyd;WE41TH<2fD>W)wp(8#UJ zth}dbx2M4r!_0jLB}Qw9KL|P7SGj-`tgr>|zV(J2E=<}Rj5s(|Zaslkm=Tj{BP*?L zKg!$;q|+UsT%o>pZnUA&DP~%?MODwJ(jjBr;22maAT5S09d${VvAVEQw@XOS7JCL@ ztul#z)nq7{K#6G%s)}PQV7eMkq1k?X<%oC;O?1x7vbi~p=m1Ig;d9)9>1ab69|H1^ z?hC_TmvEvc^QB6)Qin?x9AApu2fiR)AtVw6a?$E)&fH|7rZI}%4>y?e+>9V$cW5u~ z5cSu)taA2$3T&;EY6|Y6cWO^N&{L5EJU4twplI_!=vC~vj_CXz{I>BpxR#2(wS)aR zlVnUxk8%yOAes9n#F!X`Jcit>6I;)IKw|c!IJ)L%s@(&o@~FHF&i8bRXy?U4%hD2( z@WhbW)Y++66+GLIn%!+7I+}{rB}TBL2u}WK!+_F?fK~+KZl~-Fn@NW;N92}FSUm3|ysCMkwoAyW3-Qs% zQ4_V6(w4c>tu0s3Z}+?* zN)t2PuYyo>N$|jWaciZ6U}n>2093Bs&NrAOK91O13eQ?oS`l^hs+RncY@NgLcCYYx3DvMVEAwWH%u8}2GXF`gxC=@(tkldkegx`7kP zkHw(Xhgo)=A>)?#B5z54;K7NOml{Kd`s-zyMJ$ZFf{olUUoUd$zb4pHDZY)hg4DVU zq}E)2e#1N`V*^xeKviooe9so9m3RrN;5z&e*5LwK-=jppFiz8Jb(w_p#hS9$6P?RNOgNnh>|gsn{rm;*CzeQI!c3N%(|ONK z_fb9oOsxl8niNZnUP{u5FPe%}o!eWjPX*PAbOG0sQx>p#&4rr)Wg06?%?JIqx1!7v zpReM3$5zMmEyERpdRB|=>0#yY=@8A`xoj*+tJiKujGk+{M9Y_ln9+9{)~oiT$!8vK zNs`NARu%CpeGPFxt+T52aJoGB6?;^)W^c(G>`meHc^WF^X@Fdr9!UnGT-C5y*lV<2 zRqrke?|8t(3cJUg;ZH@O1vQyQ{7>U?+R*=KkD_Cx~$k8oTE}n@IFbrUW3k3z2 z+2k8c%(9!1<5N0p_zh=`?$c#2D{`Y;3_leLxwheJq~?^zEt_3-3WxcGR^olLRYr$C zz8`p-9sW5@yWME9SEONb(&83sA_x6acL1xw@}d#|N{gf8G}XF|ia5n>Fu(s^Go9u| z`j*5PfeD9lr)y{Q zuu*|Pr|ERINDKM6U{br{X~TxkH}*m&)+%p->EiiAC0gei(}R|LnFz-BZ(s!-O%M|b z6HLefDs1MG-sBYiB%ZhSR1YCWGkYk0sB0v{?vZ)lkUu1oHnVy~?D7OPo*(fC9gEjO07J{eRw@uG_2CczigQ>it~c_+H&ujiKZ5VN1lrp+mCEc1fv?YXHeX4 z9868*Qq$5@2p#TcJ5sk@kq@Yb0}X>hXkaD#eqM&XS##12;KK~6c=HeL!&R9i)Z~fE z3hAH7My!@A>YC50_m%bR;~z}YOhyOQKW$TU=H(2Pq?DATA-xs3)yq-RJH;&!)|BK3 z9mpQhdFbzZ(*W~B;htdOmNGv_q*s;AiaTxvP5!8Y&VelN!vXgvoqXrD)bu74nFl$O zSk;cP$Tn0BeE`+W2-s@S`n}0TXoyaro0nwCQ*1`-*V){|;i?gvf~zs7Zv%8jZ~MXc zg7Ob<-%|_ePix&u-?;bO&g!BXd0kNl9gzbK_Ffi4y&^8wWZyx0M`(t-n7t5f5JD4~ zIiXV>Qhn!Uj7EUD1i$bw*Bo)drE9L-Hm$@=VdC3g!4Y{5pU3Y#+`JeWVh-4!=GEUf zwR3#Yu|=N1xbq415b7hfO8c2qmty|kYv6eUw_;yFMymk|r~se>A}t{Ri87%9sxR`O z1+M2C&%F_cL~Y0qN~n=vB}SF{a^B%t$wt9YQonuCsZ4QnZ?`%_%8%Vfzhfc?52qCL zJ1=l>)j_caiU23h#wNUfjE|i?-T!!^^5fw@6cduo>iZhQ9wEX|$eh1}M~_&?%Z?FD z4bPI&W3$CqwN)A7g#b&mfKxjPSbZdG90kyQ2LtS^x2N7orvsJKTBq(P*3~wX|wj(Ifaxx1NZ> z{GnVGD;^jtb%tHF$r|g)dRpQ3iKjBj%k9UUKqD|ss=B%Pnl9t-&6cB>l6=Q;G!HjE*l9TZpj62( zB(s(D$kRGqWADST1Z%V3Oc%nu7Q##>f}s0;;5}BL2tPZs9|8+g5(2$pywNUTt(dP; z!$kxlw%X(y?*I-Ck3n}TAY>4s(CN}_=&{#eea-dcF7a^4D$fh~uySAQ;V1QXBZ79P z9fpuxBp^duG2J9S;$Ripx;&Cik^1=D%%$xIX8B1bIR%YeS7j#46ikL94jP-l&ymtA zZ!KZ9p~pnY#}0i;%p8cV6+)1PnK2EoJyQepli#P8;!r-gvmuZ*0T70=Bzt$|$(1b> zW-SWC3y|p3H$R&Jp$~oq)DTZ`BE_S9Vp_&!fS&67czy8se6E|ZpNhPg$iJU`xYuI4 z!Ckko^R4Msg*Y)K<(XKdpV$|B*>q@T*Vr#sq_|XZ333HdC6D5C?nzf=;LDkeL?X+4 zgfW|}Yt}6UTpxNre32%>vmFTu(?bGEnkY8~mvWk^9@WW8nQH z)D4hl%Qc|oXUTU}UBekE`fcy?!l%CgfGi!$mDE@jms1`>-!pDI zZe7eey}e#gyGYfYuZ_h+8L<&PK-#Q2HoO-f;?XR(FjxIKw=Yh&QI8Ll!*dm^_qHCe zeX4^X%CTCX-4Js_|I)nVM9rrA1FvTpvx8xWyEFvawJUC!2gzo#BDCX_lWt?W=0fb? z7lQb_3q$92*t=?&M)e<$Ma$Ry9mZ*hgPgEl}WXFRKb*L~AJYIq;t*4e)t| zs*};XnZv0eMxr+DR~ObMW_Icu4n4uA=XTn1>7jzw1&;wAXW?uHA89r`Z%^=5L5>nb zr;*L7<5yXYRu7LMKmSC33VJK|vFc@@u^6QKJR&_;wdh0NQ3ooz07~snfxi;K1ZSr6 zhneQnB)oH>rUZRR{PEn!)T1YbDGCSrMqHu~lOeV%CRJ>jpWTWBjr{aW;TVGpE#gRl z^kf;S?O*^2q(PJlskB|VnO%HBFk8bQdf-)GsE}wbf3+HaXkLeZQAco@_1F_$MairmziOPk8Ki`fUMTsUSJ7gBH+`GXzRn54!u;wcMLS^7R-3R>w_CmeW%#gAEPB{JR zzC`DbtnByu+L$QS#fvh;4sss3e>55t35@gFl4A0d8e&f$gsj7l((U;) z2|U~SW%8{I`QtZ$Q_&23NRJTK$m}J%rFgNvBy}4$t+SdC8Y)%fd4aRqBDT@N)u=0z zqOo~--;i5Y?m5r8AuFn50Ux=`PgRdl#q=;Hh!iqRLZ7I%_h<|F?QEA)+#PYo#l$oU zF?{3bA{+2b?{ISmwD%BVs?mlpGJ+{{Gw(EPI9e{a;h80toc_uPYDnw){H)IYx zy00}n!1S{R1d@d^)Qq1!`&~v8LU0N>@k&u(EHP1nHGJ_KmR5`jr?o~;K+?cXZ&4fe z4*m5LZ(LipF8)1Q`ci8!2MT)Sj=Zclc19-ETC3_}gmFg|-KsQAeo$=z&A9@6P8~;) z@i<0`vS)3IXRW(msDl>AfKZQIL&nfWhD~`Yr-t?=50Hez2N+<$u2~s`G?_p3bgTtt$V1iPRA#37hW@zCmM6{|~$yFSjSw-b2 zN0{!I7z-jKlHi59lJE`Sxop=Cm^57#ibR4GNf_6hH&+`c4?BwOD9-_%KG246jU0V( z^HU);oZ8WK!!>E&0;Qsri}IWB`Z?azpGZxHZHK&n0FWIfBf2F)fZs!`a;{OxB#(+~ z8G0`}L^kKq!6(O$>X_LM(X>!`+N8ncmPQnHi=wL|F3jvu-CK6m(8jqTb^a}EC z9^a@N9x&HUs+8k|Z>>mY>r8ame9+k)ZPVdkeQ|q4Emz+Mr`E>z%l~ zzP8m22f%|EvUfuT_~8ifQK&HsR5MR*()pxwmtPou(Esp0ORTq*X*ANdMw!(*c22Hv zk>+G6am$l#Ah~hKQK4X_VnWL41Y(5`an2@gu zORSF4R7UpGelZF2JjN>6-1@s@8!?mnc}{F;LvoiHBLq$_NN~bh#irK1W=A<~%#~XX z&o782F^PTee4thjWN<|Sphdnw#tz-GQ(U1^^9w3st|VDtQ*Nf9J}9#0x5Aj#w!)YX zxB_x*XZ-`nm&sM%dk4`93Zv&tQ*?aR@b0JK9aV*$ie>Zb+z#k5aFFUZa9|^e$nJ0c z?3~PRPP4UG&x;xpW+zysFM#L{HDUbj{de$!^kvcAagvK$-fC?KgLkH7-?Xkq9KI0? za%;(ztV{Nby@&_oxV^7?&!bD4y-ZT?in0O_P0aM{Dq)Gd3wOQzQd#JplteibxaDV+ zg+cCvIvQm*ctg^F?DDgFa8lLjlU~0)&lFDxo&N+&)E(~++FBoSZH zfkfXsM{zTY7@1hKGIPceDnsjqUfW9(?Tk4rG%zr0P+k)yD3H?*I3Gv+*Ipc1T9$^o z{qfJz>1kY^o(-nUwE~9LTM);|EDhCrDuQ6RGMvdZ@yKJEo(bYalVNG74cwp-s;Dt2 zF^1^i{)VBD0nH}x{>ySrJ!nH`XiMX@M$3T$euyO2V1t9cPa7H2V+Xk5kBV*zZfY)S zF7u1?3RQ$&Hz|AhpCK~~ zcC*XV!=)7>&lA1*nSe{*N+^LYbCNZb#Yd@hD(q=x!|a4VOj}~KdE}HPrV2g`e)JTU zc9|FxKrNaHLlZXL^?><8@}14(oDc z7B`gt9Q7`|1%P+bt9D{r)@n+yL5-pj>`5NELynZ2;Z_YRchal4GA!1psh3P^`SR#^ z>=Wo6nHDnckI;6qE23wIvLDrIFWl|%*EgvHDgBj*!&7Taw+#7h2cUM;-6%w+B~?hV zBEB+3o*lpq1cY120$l=zM*|${1kt$2E)_|g!_(x*0o2vav%e;=Wx0iF1<=-UYp@p~ zjUCt)5@9H1kvYAZ|a9CnR)tgPg z^>2q4o!QJ;NifeyzmXYluoxRlUo$t$iim4DHre<6+XVkysi_#@@297i@|zR zeNClNKPYwG<#?e&bCnvV{0KoGt^7adi<{dB_*BZLIEk<{FxH` z0KI}?E4X@zfbcUM2Hp7Pmab=9B=MCmHgA4th#8;GpVk;!EtT8ChL#bost1!6Rh&GE zCGzm%AW67!2DzqH#I!<=+_Nlr4|q73jw*hKA;2F_}E0;5`!qgk=~)6z*VZ{IKkjYyb1IJG`D zu4JkuMIdBzaFs2r_V}X}zAZv)IPQ8v)-b>zOHjU{I4=MW8wm|{5;BvLO*n*&)f@`} zTABT1+T=?Ff_5Ue5Rvu1$J-f&g32$EZ)~Vgw|c_N-tRA2l+Q;|I1Oa0jkxrWaUR1Y zut8alRKWEobu_Pz6Xo?$blY=r{Y;PlAp4|mbSst?$1|R;t~-4e6d|U8m}cMh&Q%k@ zokg=c3$=(}eWeeSf6uu&j==TkwwKLz-M-aRJS>(D z$+0Znb`}+aV-GJq1IZ8>(rXrp31-W33a+f5*TH-045`yz0TjX5(2BgAOEWp|W(&_K zRqk!9XswVVoCp%eXQ)@7bG11Nm}~?1LqjrBt7L1P*v4xU6e$_-6{@6_LhERcxqGi< zrm;cI%7lpfE9+15w3;E=PpD;@BZN9BYQoEgWsu_OE?{iBX+s{vEOj0m$rYP**J^R3-d`(9nz8lrKVf}#|(D4J<#oAS(~Y) zafUv>v8T7V1GPQ@!r+)8z)Hb^?tCR|S-bG-U5(=pvXI9Qg(9c5hU92+7|=R8k@=Qw z!dK!6Yz&-o{HReB5pE%9g#B!^=Bl`NSe1*r#UcE(v6feCNk~fFMMl!}G2%S}{S4ER zq&N|Z)0HuXLErmC82T9q`D?I3G&3(tZ)#gA*vdLs4NrR)cO67;0CZxM$=3SbzrI(F z9`z)8^%u>RI36e0DvM^vQ60{a7>85bCXj@OcnePAEBA%#&-8}7-MTdxE-V7F5TJt; zF2r-#_~{9+O^9s;&4t#WFb(!SSP7~py{}VpQa31m!a@6Wd**5G3zFu`o3Nay1I^;J zP`Fs@>_H(^U=}P+0H5xrc20qOX@`i)neP6tleGE6Jh=teA6zuQL8^T&J05Hm%4n|j z!7&|~Laxgt&M4Mt#Y9>NFqNm?`{985onlf%AcZ&JQrtSCH;RGAg-#pZ z71FDrG{v4i-a8R9sVOlKf8OhP`^=C#TP%(r7HtmMamv8912C}KSSXrhtl#FPvlc#| zm*BaG<{AXI&yLR7l6sNCucOy#73IvSBHz$qH%2hP$9s$(0D7sVx6TEwhysu19Tr+M zigdmi7v>t4u1|-r8x256opVnBo zEr!Ic6f+AP&!>Q6nzMz-f1)C-dr#(ZtYsx=tB#EXfU0E{aK?-Cw2YmQGqU^;U*IzEDxi zY%8IxJ)eCk%nzl*a;(Jn&H`7aowBDG*OGno?wq3*Y~iP$y8W_3b>!K0Tz=y|a=&FG2)4;KTA%nzA-a`^C8e?4_109X;U9jy0)-AKvKzQRU`nP3Y6@uR$(; z%>1b}E{l(X{qFbii)+a3%_o+-*CYn^U;}TWEDi>TzSqL>_$fv2`A~m@??Jz~Hu`GV z*j6bX9MIX5s%>Z5wHjH|x>w`ZSY3j>M5o!gR2p47BUW*g|m zQnLWSzWBL~fu<`TAcZBY)}>QjjSaN&<}^j6iNLJDngV~^YaZGbNRl-NT1NCcmx&!; z@)ls=U)(D@19ST31gJ@WvMZkp`wA8PpqBUYrzbD_NmB>WAviXa+d4p_C1@@o!`HSq zR5?#CJ)YZER!dBQp{lL95a}qUyAcUDuTT#73H{h!vKHOrCuGT})-Cs`rEFRUsF7H# ztN!%v`wZ=~vMc7|Q5va>L_s#1*1Wq-_6gtfwjg~GV?t$RT?g`P=!^{N;X?el^_rWt znJJTe)smf9SVS?EQuhtNtRb4L82V8)5}kwK>Q9)D5Dh!v*Pn4UK9bEEq8r<=5e;Ag z_@m)37ndRoc1YV~MsBMSbMm1Er)kLyN8G;-(^#Z@be5#y-IKLWp$sxbca@~dn+axY z2FD(i3mew&+f#b>eapAUb3HWLq`J|^wJWMi1L)$o!mR`f?RfHp;5#{{Cez*!_gft8 z^&;B~t+q1bf-*Y@1frA{GR4Ocypmb~OU`(183E9jD9+)=EWRIN_&?Q;YyWiGTP*! zR1Fr+>>9DKlm@HJ)$)t)U}hYNTk^`}#WSIJ zZFw+vkr}eT47Yv>RYa&%_ke6nnufFmwMx-EY0uYF{a8lqlrf5INaWC%3~=Y~OuK0Q z28P9{UgXz|9C;AwOJ8)JJm*Qv;5LW$NDvAdS1}Ua4XL~oW;FepDAFaG$r!bnBI+n; z>^jo=?clLu+qI%e#YnylF??2Yjc!Pm6+a=`C00q&xMd#iKu^ERE04Qr}hUQujeYidR+rEXXBIu6{DIX*by2CQh%HUGeRTEpK<_Lc`4+0$4192U>oOXQ& z)=37I?QjiVqV_M|WDgEz@{AesgyclV7@)`)B!ah**Im}qchl7(R7vys((qlTuZ1k` zQM8d%ZOeINxw{o7Es@c9@tjhOI1EaJ%}laFyD7Kk>|jT2ATuK}Ida5$Wd)?rw{R3J zj}lxs5ci5mMz`vQr2xVM)8Q6O^zE-@+6ELSfY_H@?pazWamAN(SNk86*CM$zc|A%l zf4Bp+_UmiK_cAJmt5nh-8Cb?Qw$8cDM-LQ+@4P%!OcxPxJP7LLUE2$dDw7O5jkNvU z+raO?K_PN1+}T7Pz+j&p{H zwpumbqr{9yl0KloXHldkDe6lo{g}3N$1Ocya@>#PYrf$;Ku-JB9i)5A$FCt~JmBMw z;8_hfGDk+6tS{2un~?yg3xU2mm27U+4MhhFCEMuYA*YeRB`u}hG_~XU_v^=r3jV&< zHjHgUQUZ3f!jQ;@_>rtoObo+67fyas8PVF+|IG7=6`cjd%Q;nqy7fmtl~}6JU%d&! zqorSx>ExwUD|+8&e7ILC`Ek-qog>l8qccQI;DTgen{0!UxK8m!K;RbE>a)Uhh|soU zrCziU%c!7v3_y7ISAvHZw+o!{w9z`Peq~JcmE<~YsB+^7$-a7Xl6mPBgGZ>v;I~G` z7_t&GKY2kwRH;Fi7lxQRI~#d1*4^d#9rC_erCAk{d^7hgXd|WW%&&aQqt^QqCeI3w zDezA6H@!VszdH5Yl8sKrh8}X}&@IF3!6D)JylS$r{mqH_n-z>c8Qr~e<%e>*&?)tk zxN4$c9MmMue4HZv1)~ISC4s77RH`{>u8W;xk6jn5Q9;u_59kq)Uuh zGZA`|YAmpco{^3=TjNp$QjVF-qL1qMl9aLZPE|m^XVj=IZ+jl5(T6tx%UitP3e~v> zVW)2UxtUoX`<5%Hf4_f%X>KR7i9Fc=4a`9OGKskZPZ+yHJ+^8`&gciC!>^*Iw$g1K zIK1&TKo*NrFc}?NL(*_zX(J|JQ0%#U8UBQw^+Oj~RQ(eB}+VzLR=FZ(kP zNL?2NmW9wW$=M@#5b(=mUBDJKX62plGYQ!;a%PSLG#=X*)baRN$x6(Q4f(XH#Dd04 z>>dT$I}V>AYe7H8mnD<@@uEf>3S+enx6v+30TyLlX=50W*Bx?Y4Ar7!X}SYMYEwj2 z%-lx!$-azM2)7foFi{yaqVAIyMUgW52*)&+vck?Yx>I#^ElH?W8e04I6J$Zc<7seT z+jhrb#f80F6K6DL*X!JV5HTJ5wWrd!FD-nVRp*eIYjCgm{JDa6F3Fo_t(WMA?AA>| z5zuKouz;OyoFzq#xv73h2-U0av4oX3q_)HQhRfDlsfTIo#xTTq@kjHE>^*CnCJPg7>vD$W|MEUN_n*F(sCj zbLd-5%h;u3xiq3F@Ck?qG}+KMDz7Y~Rsk#u9N02Au*f$*x*0FXD&UQZH>{=EYz)Am zWg|Dhv~51fo=;8Ml9pkt-#nD@*epqK$t7BpdeWLpyG1)jg1H`)CVt4AuM;zdzt^hl zHr@9iJe3I&IyUlpxq1=mna_04=B@f-2JZ2Bc5x^Qlyeo78B274b_ZT3T* zz?7zs6`8w|kk5D08T9puckibFMI1V9ZOL|u`zcjN?`84mo{!5UuJ=kPV8Dt>qvEjxV3$8PF?pGV z@Jsj^eJL3CBqUnE9TRzrqwj)O3U4b$^by%8|4r;i3=(a^E@SshYV;3;y{K=;>{(){ zz-S2jS!RA1jo_WfeCIAiPrN0mmY;Z}O`xSzeLn9JaQXnbAB;#iHx*bVE)LBdLy3_Chk;gHNdii7i zmt%m!Mvv&?sMHeEaUr%5IZ7_J!-7!)rhA+)G7F}0dB;wHdq6skGQdFkJ%QIHD&;%s zM>?QSx{$DI>J6KF#Ir=x1AwJPYl?0a49kaiZ>xRPZ0Tpmw>na zPdM2Qz+2AqH^L0vHvn~ZW%JT_?ILvR&k~jIaGDxgp6y=h9pzWZznCwf)R}n1i1Ee} z-P6Uy#1G5!k|SM@jwNLt^w-_FgDUioQ|V@N+?|V147PH@Y45Xj;Oi0TZ)L`X1R%l^&m-ogHy`{6 zzkHa)-;3g*xZ$Tdfp^{)>k!f3mf6{JTyS+l5;{s=GF+Y(KGYWz7SmLORZ@gYHW_OE zD8+14@Fc=t+D=2|7au?GytN?LQ^< zSSdhP|0=O(Y;F1fD6jVh90LL_{t{CRRQLF=0|o3<`1h%tn5r;?l)N~TqRbzve>ZJY zBPj45L?8tEfcBvO_fg;v)EglL|HF?E6hQFT@ta=;=-kfH{BKsE2Fc<7{y*4ng3iAP z{w4T-=x`H8-$MN+IQqS_0{wrBl0-3E)C>v<#07-}GX0w&7+8Tn;Tzx^I83188w_@G z7Di)hBPXZ-23x+N|3VCk(jf=+D#I%<8N^>;y#Hy@Lh0Ej4@5iz`jEW>MZEFM=1^)K1zkx91A56`RT&$geonvHF5dV47ll5?d*r0WGSrC~0 zRg2I_zk$GZXj~xE7}P&83RyYC-Jn8b=tN*(B(E^`C?E_OC?@{TGX-wo-~zM9U?4$K z5dUE|IEMdEMkGAmFb$xP;vfVtFt%5W4Bvt1F@Z$m6#t};I|-uq00|oc683eUnp6Fu z2aFT{lRnLuldBk{dx%(IV6?CJ)6xD#{}%Xd91EmXz%52xkQDzq3jFcdfw^2*KqMxl z|9M6{))?FBpkWdM@|a2gMu5Hx{2@6&AOhes6U_gBpsL`{yg`!Vg6{UUj`NEdH1u6A+i*_USM41G1Zcn;>As^zUZ{bOKgQ zbN^G?{}dku1LONQv)@Wa(-#ub3}Kf3mx+8Ux9ARfLpoj|0CI}c(7LhnF>%VWI&w)qW=N?cL2@bxB~y+Y7mH& z_5W^YU(Jd9jRAcZ_;2t6`GA`GTy9+;89O@1wvU7UU%S|MJ8X XWuQR%2nNOp`a1%>wB&z#7hwMfM*(Jl delta 47985 zcmY(qQ*@wB&@P$@C$??dwr$&**mx(lZQD*Jwr$(V#7-vX+yCB27rj>9RIk3MRaFmq zW&-T46%0a277QFMAs;;f2Ne|!1mx#W5D*YykY3DjNs<2|%>*HNbd#}xmdrD3oHOh@ z=R4;gApa+Y^aonvB6h+y@{j+Op9KB`AMO9WfP_n)mIDF=gb^kQpu|p6_<;s6nA#b; zxWs7adMrvH{ll2lFcJGX0?j34B1PoRz)_N%8eICDm~0OmN3A9XuzcdJi}I9TnaSwVA#>XZ2L!jO+V)jF+C25~M&jY*?bg;x$h>7a9QLDQBv zD!<6E`N&dcBQc^upQW1w_pfn{1#UQXVRZ@DMnyBmgvC@hQ#sp}JToJE#Z}<^s7OaV zvc4sTS#%Db+ccFbt#)J(E~oan*+%)9d$InFp0}jx*m*i&mSbJn=uo7iaP+E%CZgBS9;Ks7n+z56oG(v<##~TKiL+urb(u6Bksp^HK z>>$v$;+<6c>9;g)L$#jwnu7R-5$MlPbB-bTL;I(dZs9|%-||(j zAM-U4q|+9e#LnfaQ^sySj=V*}-_a#dpnApFjacfj#QK-lmT3Hu^q%%>$5dUv z(SNh6Ug&EcKWf#maD9B_VrGSIkv`SB@yfa~Zk2GKq>UA5o8(|*H_)6FeSki#b@|A) zaSEc4-O8dfD5lItIV`EgoT<~&Bk#*{MwjKf-x-8A)~}H2nYvcXDpq4+(9v&PuG{=2&w5^vxAsz}`lo+%oOze1N; zM8h@xnwU4kEF__U-7dWs(NNTaB>X?&vm~^cN!WF^Ip=s4;qw<&U`>*LM<2?3ic5qpHFR9HTPX z`^1vfcUB|J+{2XLqlKjC=1P5ca%E$+oj`=77?cCl|q8``t;k|l6sX=PA;h5DDpe@Oj1r^Tp5UYxP0MuLB& zvId}K>|t~GBCPL`O8;_+^GX-DDQseg(VYnW4ZI;9V6nj3ykqn-PItpOeFXle`TjqB zT7#f$xahw=z5L%HO>#8GNb32C3#vn#wE2?|@S5`BOMf%C8Aa{Gfd(@ThrV0i(W7_? zNe#YR;gHZxV3c*j3?82`+jt)+FRHHNu*5>PSfQ@X9&0&@K~*Qm|Nf%a07ps;VqUOs zzBTX`*;r`DkhohcN!FH6{})jF@cV3!cbg~}qX3gdMDUf#4)0gF{rMi)|NTP5|2;}p zoy~d>K|w%-k_Zs^0euG)VKjcQ;DjesIf{(Vc36kUU+$Ng4i`({-}^IIpC4aqf<%94P+&+3 z+OG|*VI7!DYC4>k)EM}!R^%{CDWhJU%ho ztT42|_Mzb(*(#AatS*B5O91zNL5L(=$#6YTtbZKC4++1aX|sznT21;UA(K zQ{vJl7e59=HS_YV(8X$G?p(w7$KehHOD)Pw$wVe~fUK%Ym25Gxt^AoQulHA5+i^65=ol@u;D|Y|yYWd&AatVE6*Ma~75{C~0Li|7V9J`DF&LQl!Xje`APdG21|NAQiYX3RuI1y6iqGMqNam2l z^(IpgQRP+G;<3+0D>Dv}_a(D-%543+-7N22Z14T&e7iXY|JcU?@mdCV89JZy=5_bu z=H^S$_qda>3*0D456brrs z{df%m`G*7)XV%eV3TjN}fjdI|Tk2bd^X31|^QjFY{OJV(1oWy+?kY_iX1rd4{Da(8 zo8GNFxdDCk`4k2D4hK}GFH_8(W+{5m`+D~b;Xkt?07N7De?_1diu6Xnfgso`B52 z2CoM*+kDJMb)dAG`A7p$U4fiqyp+>+n6SUt+DsvPDz#%O=}(qW&6Km|C>c)HaO=Yl zwPQ0&BKCkGs^>X$8odr*A1_Wq1NYe;dK=%Sc36t=nHS!aZ4b=c=^6a^c$OeRbj3Tn z;Ug+eO3y}A4Q9#W_fRq;$B|zZ>}VhH&Gz!+#Ch{VTt7X8vuh@Hu;Ru-`{G9s z%k<>a;&^zgn3e(fFXetbrEb!28x5wdxax;j#k06E3rn=8s2L;_Cn;A@$}csQPLoC? z0(kh+9Wz%{a~6zsnqteyvjlvb_HmXi%wdgo5LK6~rz7}vExmQDljNCJ+n6!jnL);g z@YM5Is>8)_ImDFb;)mJ>?883TAU?B*Jcl+3S+*{GyoW&U;m9>sh-^oLcA2}At~||o zd#7Z!UHZaZnd;ymjmd;Ut7@*NP4%pDqo%5d&g7-@0qG8vUq)0zte6b5@f;x;`nijR zd;8?5ezLnZvMzzUW>EmKE_{cs*6N!hn?4ag^lDF z1YKK;n8(zj2$yCFi!+SDk^M!>cIgho>20^QZCjwTp}bH>Pbej>9B+RGRHWCPnO7Fp z-75WR0oE1qy9R^KED*8Or1kXiG{(u+IuFgZHU@Jw-ZJ)KDnglF>^< zXd2(;Koq99iY16nj3HZlV)hMn9Bx2^A~7VXb6XhFmnc!HBPdpebHs~bOm~SJgW|T_ zh5%?{iVdS{m(saaOB&#Yy%{oX-YY+iX^W=aQ%b~b+)l*z)R<#IRIADI*^ZC9VmmUB zbszsF(Mx{4U_4H+ZoALlZncl_z?Gk=V39oB zC1AFX?Yl4#wvx^hgX6Z5?!{|5YDc+p^1|gu zQWx4U9pSeei~k|3FeWXmFVKc~3Z{TGp-seROgRXFtDCI1ML{3BWjRjWu^SIX=cQyf z@SD8Md@hlg+d85s`WJd=2Kk`pcp~z0^aQeOVWo!zyXE@rR(iWBLRNs}`)VWvFpgH&3y!2jj z@hO^ro#0`y~WqZSs?VvXcrSwEg5OYLLKXjdq8S1AXdE|WGNd*LDUWf{gg zrC1OtkTqqh-Dl|PvJvMvP7(o@C|>Xz6-_~S)%Qet@MzB;UdE*!=pi%n%ACvz6~h{6 z1Hxu3f7ef81C5-LEFLqSynmA6JH)Ztm6^y* zp+j(*BIgJc=`^(HD_F>BW_7+;TnK%ytrwJMEiIoxm!_x9J&&o*B>Mxfm!~Uv1@8+X z={i*ff9^yi>GIqxl=U%-HT-5osWEC;L;rM(Evx=nsx2rL|EI5$Z)1#}UJ=g|8KrtL zgPA_NoMJ2fHSW${O%D@cr<~=S!tQc-z(c|+i?BRzb~**GrWN;0lRYl0qG^)($&Tfu zS&^u?{`t{kawg9nopcP~hh*_e*mD-z;S#z=+LUc)>J0OgSbzS=6-s9C;JiXfzx1h)|7FFI+E<~ry6*sq~ z;y$$t0nTL4F3vSpOrC6Z$>j~T@n{mcobH8nA>4|4LQ=1z*{+>S z-jj!v$es+$NPr92k6quPLzmI242IFBsqRPmL+rRW>YUxL{cH*{!8GF3Wt1(X#E-Xz zSlJfz&wHKG5a|*^#SdO+iz+xvp(7$i(*}Hz(6z<$zhcD zvF?F}ophdmxKi!~t;u=%V4g0@!$tfH)KPs9Z2||UuAmDjc*F69C*EaOV`I|~%7Yz& z+f`>;t0ix9<8$D*am2;gcMn#IOIgb|U(e=dW}K|-qN{4oH2-sIqphYWeSAo_tEgRp zU`rh!F8shl<4|}42@1v%Qh8aQOn0o4iqqX2!C@tVufy&@+r&8e5m=hSqtFA3IZk4_ z?A+}ntcn9HTQA``SlML`1Y+Z}p8h)M@M!GS&cmIt8^3G@5e$^gTm}84@{i`-o$iTa z^}Fh&9If^x4-)y3sn1j_YmFSaESEPm&iaN71mjfV6dH*tt#7A1QZ$v$sw-eV${J9~ z^wrKnzK0McCXG2JHpHRbput!kZ7}mR{I6iRBq|uSN_bfuEtwa(S9ZysWnx{ zsS*qv&J*Wqr-;#YFuE3U+(ujJ?JD+mIwtqAeM+SHs?kwt`Pmku?!O1k#^H-_-2cwT zfw!78vqCfT>OfL15EBKKmZ~Ng2Pv2-YVme3!G@EU;h(o7`oSJX^J@T3y?B1X7ZrZm zx>*1SYO#lvsl&D5Z{9mTb)D-DUA1mpy`%q{ZhtJp*67>Tb08gd&jg^r%qYRG4S2jU za~g3s=Vp5G&xQ;hO$bTW;!L^v=&sC0@Xf;UO{m-!srlQdl>UfRmN|jXF0l8CTreiS zv%~FGaRt;JlJx|rzEb=xLj!x|INj-!-d6>LX&igC>RUc`6{T%%VRoWk<_ofJl|Q+H zR)|JrU!iL=J>xU{Gdc{Uf5jb8uEWN!lD<-3sENm(-mzY(t0rmQ{qR*PsZu)~i0HQC zYDj}FW2qQ8d_|fN4{^1S3`u`w5)hdz@B2qWQ|9H^5?3CCx>X9@}A zvdlr;CCsw9xCqe9tL+MZu#rE_l9Tbtt7a9VmwPea-dR)VUT3Fl5u(&*lnRi~(o5l} zeuT63lvY!30|6j4zjcXWpMeSs}3MAq5qaX6j!d zR0M()Ewp`kU~71BampM$6d$T?`7wd6vV^V$t4>f^s9O$5M^(oU_$#dRftkH->nj@~ zxSJEs7kI1F<~W(95(wq-8(a}#P&vMI+c;i;_tvm7tD^^DQ@oL6z4bP1EQ@5GT| zSe&}a9U*kTW~#a&9hAF*ya4Hlq>4P+H0#({wr5vPh?mj^#`fM%aXhJ_rZRxqQz-`V zjf;S)PE<3v$-c*eSl9!H-yWUVuspD88|*lyf6)3dG5-`DuVbPHx#j7sx`sF}nZ)5? zTj*QpHa)QJkWp1C33_$37un<;!k<;cCf{DDMjrBwCDe-+-Ii46nYn>Pu7Xvr6jrV* zN{-yT;lnD(y!e$(U=UTO;vc}+bb2_&qBrdFxR0&F&FYch|4oOwHJa3V=yF9p)RW!z zY;LcOfp_EsZ#_|Nw-w%KO`aR8KrxsMb8)$76~HJs49!1DKYJK*h3*zYdOQ=;-*y*y zfq+ndZT%-=d8h+@J)9WiZ>7ELp_mJWNi9o{g2D9Y6pEjse>{V4b|V0UM?4w_Zlwfj zt*58?7sXm&&?Ucy_RP|YjGsOQ*~(uVS^Q>X**h#FVd>+FfO{3a!X^gH`s||Nmfo}0u%;6( zv9iYpO-g|xRnxnk2=Ea^t3Xm#3%i1%Q1 z+K`@+&eZ&nEC~D}x?ysgAbKZq^OAc@xp#-k844$urffl4D3*W-3FKFT|3SS;ZiF|O z|1V`u?Oi$5sk=7lLsA+~! zF+)9QcZxUVwLVJ!11-I}5Yc^Sqgk!tG*zP{1>FW(62g((I=3Lelw)mKp12oq3(m?n zc#CsnBCCu@t3h!)vfIR9@?W;@6|9sW0rY4ayr;ne0Y7 zgBk{x{i1<>E$28)T;SY|o~+U8OG9~O=}GL)p90f+)WkIvp(c%GsrT!JUaK+YE;WQuQdY4Mg>H)Da?z^ zmc^2ihZaIeSaKmwTE8Ujp2Es19o91fFVQMNjo=WcNMC&ll_rRG)J#)Ph4|4QIz(7HHf_M7XJ{8>>VJ$rN7p*~i6PEKbUrtKpZbQx zzKK(UyBsi1My8yJMj(IgJ<|_p4x+=)TEDgm1-d1h?~>Gqmvylpru#1!B{T#?T)o@i zy=y(e@k_guaI!As5$TQ6ZEED($dqW$Oq079>maQE5*JWzDRux@%kN|YV)zSj12+w$H?EjLCj zEZ*_^8jd2~^4%?2VxG8uDj~n$lHv=F!1DMPrefZK3OnhJR#X;kxO3ltLWOQs>a*dk za>C@Y`B^8+r$_=tYap3U{ZDWZf`_1AEUsN>IPVp)s$;NQ9+YFyVqISNf`gOQ9kH5@ z@}uAiwy*z1cd!8~5stxFe<4JN?{PM_^HD>zwb@SOCoQ`Io{nQ#26i}nIUOl%kyLpM zMsb6aV+{`~Lk-V8QN7?D&R^MU8@1Ys43XV$Ml)%yT7VWSv^6KqSN6X*OQtc6c3k2b zUi{3L9S;RE2ktCl599e##;Lq2=PjfXq?7I12gj*u-bK~~n#8=~6eKPGyt~El-E1h{ zeo3LMH5m)ms)#upmT-$u+x;mE46sr6CD5&zh}2$D2!kr4t<`@zmR`(5U;C3_x|BwA z>Wt8dI}dD|CtLTlAyK%U;&)sYb(*TLl#G84(X=L;b7Y=L@0GT4DknlfZFz5797I#LQRw+h7TafC6UTkl}Gu@ zyUeuDI?*X$)=scz9mywu0hWKtBR1QLh;+XG?+1{%gBVPRFjT15+3{Bb_Sp#a`Cb;1 zNrag%QZd*NDF7S!D!Jh2OWsh~m^f>~E@>!-5MOKf*-{UVNmRI^e%Oe;3p{-eGy{9H zL72eKG>0+xpBj8i|Lc=yR?v2`=h7m+1P!gRWR@ zIuyX3U@zVJi5(QVQquiOgTP>Nspeq0>b8{?LvG5xl@>#J$W8_}QqoI)$ms~MjD*l+ z)^7E+dZhj(1dwiNJAp{d?rUOT+oRJH!xRMIt`1gntow1sj zqlgukG-GT8!_g2&ba)OI!}Be}bSD@Ww$TwCvg(Mujwc*W&59MJERNG$AH2s`Ge8x% zZRr@^zAm4WM_vO>Juj>XxunVbPXUNU5*PnO7xm00Y?7p|Wt2rwy~m>Vvicr2hR-{6 z7)5E#7Z+vViVYTnA7zi0V2}Rs-Jc*JJNSyyDX|%k2s2mbvQTlF$W z+K)fy3%0FW-}(60`C$m`{hSEfTW?Gik*{FK)9ua0S0a$$6LrJ;mq}e8Z+L8vqH}Vz zJ=-Q)`K1V*)jHKoynigG<$9cAoziZsv~R9r3N(BIGrS^;Aeu4({}b~6pXkkb9tZbM z@}?99h~1+*me_<~&}4L_7Emy)WEs&S0)Ip}DuX86qh*+(!;Qq^g+=HTUv*dEr z;XjpR%=AZK6UxY^q|(i?^f)vyJQjIFmZuH?=MAbWix@d$d)q;yxdo_`hKkKn)s?3I z#?A2y94V($$o14pYr^_C=1L5o=xXAnn&0A`OR4_h5CH37cXBaz+jXq<4^-5LFTwOD zeFyn_KBYakZo9jZ)z zxza^~sTHb4n~}VyIv@9=uL}E_LtqQ6F1r|@Ik^J@jPGN4#Ss2Q*Jh8kW=>FjADna;{t4r6TQaGH|LMg?3jFYhb(G%|3!VBDis9zaAIx zZ6xLFnADjcl_~g^?H@;wx?2%Y6C-wIoZ@+S%q2QVy&#|2e-BZG23epXQdI(OAfZfh z+=0k^cD|q7L|~;YtuD={tAKE~5S5}DzG3q%ckxLoRgW-+`5^O{G}N#$mDpyOa-^y2 z@n~HzIavke2@d?w=D&Q!fpo|WiC#RDRJ|z6Gth)jY_yuBt89_wKUCR;AG~JFIGr3i zg2Q)4Tch9q+rscaDjM?tvO7@hk7B&RfPi#ifq>Bb&+4T|g9G@Yu3~=+(tR8~tpB!S zGJyg0G^RC%uoJmhgM@2@UrWbIj29KK3#evYh?uXgWwXv=SSXeMW0_eS-<-0|1${1; z^>@3}=caoz`rmF2nJwO)A)s~h*Y9TY(r*-XmhX}3cZ*3>WKFy5uuhi(LtWbBHq2jT zWt#pH&!9j~@Be6i#vM8j2jx4BuIZ>YpF0GI8#QKKlj)Jpqy0|xt*95Oc17_RF#ozp zd(XV1H~$V_AqGM0*xJoVRj;**bG&!%k z`bZwW!UN^(B!{^1V^in1cFerngCv@+*W@igr~i;fAPAVP^aRaQz4P)F9>%;QhcMK* zMMuxNRYx}*TP(|K$WNQw?qzwri0TT$Usr8TP?B$Y4p+foLT}`(6 z-MmZ78ON$Q66;NMowh`<`q@zQBs7~S5#rS~pyW^RL7=$^F6j#vVI<5&oZRkf;fQBp zMWJd7aF_GK`~(RfY;&eD5-6Zmq87enTqvtyMS#SunI0h_=RyDVvwLsTzY9EMM(}DoZXLX!mqeQ*S#hoX*V=;-dR{Y+hlBL?cmR;qUWc^XTiD$O+@Q1Y%Oe zVF0gMe~>h@)d{keN+DT_MB<= zs8?3)k`P3kyWr_g3et{zAw{mA3Moqc?FmdtclGnRM6m^N&{LB(Tllz&Itb~-8~bKt zJYB0laTA8RuuaU*F4t(&_7e;C5-I9hFvPgBsFKk&qN}Mo;NkP#o2qyflA$C zA^6oj9eC1q?Lql=wR%E_ml^r8*A zZ4#TP(5BH5IBA}hdNkk{dhvB8hq78*W3No3_NE~eG#OqU=fW=d6RGDr)ax45Can}F z;T@T`%!P%Sl@T~wBL*(;gZPHjN(r(gClPOnwW<8(6qo@d7*+#}7&Imc00l-Ad8Afl zggHrm_;IEdF+;&3gHrqBi)+u7{7Cg!dIEp4O|==etx3w#s!OnijY&&6>e@!Zs7Wb0 z7ROmEGld8d-ZE;0lQ)OsP&CxS1*B&;czA?Ws_=N`fh0gs#^UbX?shxG9 z0h?4rOr}-h!KZL%eb%7@V1D{$6=P*#n+T?D)d>7=q=ZMb~qTJ$E`Jk8~y1^^9dIUw)BYgVP#>gzFl;eitKfTMd?a=EIzlHd+$*Rhly54+uy*cZB4##s&j7X zy-MsYW^TPTwM`rt;MrM9R_D6W`27Ob$@(fXDvm}i)x4|M(b*Aa`@Jy1RH8|-#~eb_ zv|)8SY@;Kj5xVnlVD$Fiq^X>J?@SN=HBhv{*1%Fi*GWW8yQ8y3*0Fhc19)qA)#fHd?W9w!+a5vXxZ@bd+%#H?Hg^)7 zE)e5zo=2md0KN*z^L($4*BQ6X702H{tM8a|0yeJ>zJeIoekEj`ir8Yt~rk>n*9Jr05VP*j=1;@fP7=5$p#GFAD(-o zM9-poHh(P&vOfy4yC=Q^vi-7A14s(h7s80uG@Nebod%2#xe$x{0Q4X%)3(SP^Ubo&>&JQ3!oKjnBmUjz$I1xo-(qH`) zTag-D0rXr!w2lbZtv4h1-$*y%_+4Rd%-k|SswpUP&-ib?vDpdbWThEDu28Cm=e{8< zlgGEGPs>DEY;L?Er=bER4PMCwWlw5*e!=y`Bll46oIdH1!(@8N{IHwPQrR$WIfJHG zpt^{%Oo?;ptSV1vknC({gRPtzitRd{h6d8L5J%s2oMW^64S{w`h}@_bza>WH_{B+Q zFVxjQJzhWQ!K0O^^N&ko)xb0C*g+{>)H9nwO^qXr?W^r`%WELD9#6m|%=*(&ebsd1 zVVh6pHkv-=(~fpb3w5=uu^$Ys%3Av+V4xOST5nx$4VpEpEKyZQA430P6afBSd&?JC zBT63gmDKJGI?J7=QR)Y(nbTrEUEsh_mWHqnQRH|{X%|2DW66k6)lx9&%tqtphwdPV z)9I}TZ0@K&e9((;*YE7qd~SFjVjzX;T=TZDOsRHn1;lh3(RviAA^eV>e1ZrbxN|F> z>!`YOQrnnt=f?SEYT$s#t~`w|-}4vE{keMF=qeG**4qosMqra>lJ@8&d(%AcsS)Zi zhxEnVs_4ZWoac(tk({WP9!U<}F5LZ+Fy z%!4J%gE^@L42QZPLfVxVpA=UM;57(LL+Od0OJg2{V5U7w=3S_@3OuD=qVarN)T-S> zhcS4oh9m#6B~0bH-1LZev{{9H2OiZQ@fxrHGg_vojxS`}qi96h@7Hs2y{3dC$`?zV zjI;B0p^P-08MFN9qDtpad^Z^)43+2*-bIuDj2vq6#=o~{sck?%U=|-jk@4Kst=&QE z8X62f1phZ-Nyv8o{~;`SH!1l5C=d`%BoGji|Jj=JR}q06%{LERP4s`c>dCTtTbsg230El8~gjdjM zMXR|(ths|d+XJgn$7Tu%UhQ1Y$; zOMoHe_zqfHpyHr_N&tP>6%A4H?i}mS9d^f^HZ^eV!pw8)g>I;HCys82VkKCstDl-Q zUo&X2&#}k?UMoYm79-uLv#2&Tt`y573Kd0kFY@8L}XR5^}%x+LNCI;?) zj%7U6>8i-0_UIx}F`xIky+dtgxhXY)Xa6E3@IToq-M_w;I7YcViVXQdBvpI@Yxy}xF%U)&^jG&Erzc@wtcsCxHaSDR6sl-(EGS1TzX!v(|7Z zqZa;Aw}6SFl7D_XeK(y`z1&CN6UVO{W#z>&M?-}MPcf=yOV@n zq%^K$C*wg0&xy2bfh*CIR)h7G>mdCxrM`{_{-vsXb^|3?0OxRfR!IHSuez zyYE6g$xvRp#G&4DCX9~O-?&?y|KVxL%YC~fhP0HWw!p_f1KQ4Z<0O-#93qD}IUc`~ z-qQ2K?OgV^O3H(=--K0l0??sBXTDkenk$x++h$Y&DnbzLtx!+qXj-T}Yj2lZW8st^ ziMXrRnjWqVccmx8`yz*iUv-52;l?=Ica{;Yd_>=n`y%!p`2nDEo|v>WM$~ugluh(- zo@ClBMZB#_dK^w;kIS6lx~%+)U*S+RUEV0=wA~m#{;Z#o6)jPw2U0^{$wQb&QU|Z- z98%YUTqqopDQ?=Glc1`QH~k~tv!blnbU(TZh>IUoNv|VOy2Y-3gdrwD8cC0-P47JR zPXFTSx-E^&Y+2AxIQ!)vQt8#rWtVN{M$;;&2H!4@Gv`7MIrrX@roAgHzGT?rHXFeG zscyecXW#L_Vpjpx4;-V}tM_A67=3(y!90l17Z6V@xVSwvK1BvmW$DeahQ**dL+AKX zIvmhmVu)>Q9?QczZs}lq?Y@)N=>bPImvLRGZ(t-t-`i`0i*5I|f;#!mdP#bmUrBvkYoeXTFIF- zWr*~VyuP%MiXcOL^)=(0Pdx#T;jomYNyP8-^kic~LN=en3DV;w1Xqlbnx$R|=0*!s zPBi6w`T=bP|1tqX+1Me5n4oq8`QQXcf`1Mjah60JXt*3b+;2iEG>i^s{uiw3E4QX~ z{w*Yrl(iW?&4%n1Y&C@v;bn5imhg(y;2A6B8>;1-i}i-9*c1Gt0mo-pXNw}SUH|bA zfjRIiIUC~;3kA_ci!ajez$rSsjF~2P@W&k}!uuNU1Yv0z^(BIdVL`Fm(w~sCPhO8O zrf4Q|U@OFL$V=;>K5#zR6Wk+FaW9-J0y!F`PFuO}#|D0({C6MLG3`<-+~E=I;S+i` zluuasC6neakw@}k^{wSr-7YxAa;|%p)GE)QNX~z#U!!VW=Z0|o+h*#XS`NE|2kAc} z!KiD;2B2B(ac3A*wD%*I*_n&6^8{fB3FAmksc(*r4_ZDW6KqL8d%r>d|E%kS`I8;P ze~P0SEeHtF|C!iO|L0>)jy9B$+A;q3x67e^ER+aQAG4yF843pq8a%NS8#oypn7XgD zL1GZ@-Cuk%o2nMAYW)@Ud7g^_VRbbWCeW1t+)bOb79Go)&X(H9(%$cvzYJ+dNb&JE zA3L1?eEbY^-`@lH#n@tcZ&hgHk}ZKa~M#4!K zvr@Ip4jjVMk_O-Cw763*1DZqBqX#kTiQo5p)8B@;m89(}Xk%r;@3>t9{kt zIuvKjNkFG1E%Xirkul}plAXZ_yMe(BZ5LL}l4nYq1sLXvLQ<(l<}#>pjL>Urm||K6 zE1N;pT?PRMpB^RZlL1cxZZUKB)|fmFr!8LmJ`bb%y*DHMLH-CaBR$4h6xY>$xNox* ztKnf&m)f9mjH!VRarbeFx^HyY;etcFMNb;1Gf)+_$>-aOVdC)!iJcDeID8_n9z)Y5Qr)C~oGE4v;|k)9C%1niM>h zJ$gXF{t`iRju=T}K~6HjM#!4K&qt2RV5Zm&j0`cStxT=cSJH0s)js}2pQKGwtJBwM z1$>cJ6_$BSgOpL&2IR@vHQ11TWlk>j@}b0PORVWwgCCZLF`7C^} zK!r)9*F5!m($)9tVg1ZBe|oZ@YhC+^3q-ai$|2Dpc!TV1jY16kuq9ahuO0TSa=JKM zH9lyva8HuLQ!Fa02h?lhBQ9smA46h@gC%&Awl9Q39`Q1tH)n#)ZIwr-i*xo9mA|Y= z$`7(&f}3D0W=G>yH~LUDGtZ&L;b;({#b9&wKO8=JI-}&GGnY+EtiKx<$?kS-UFM(V;DzW)o-jzvBQ$@Uj@p3 zYokuVg3hBUZ}VNkyj=)I`HH62qc(}h4zu-u+Vq?F@%_9jMdo9uqfGvk+c~u2(9Pib zy(?qYs2ng0(@!q3xoK+Q$A?qD0mxtsViKL_y2Qk#pO`^nMA~HUQ8_fU zafK@60;Q;~9dDi(fTx|d%5R|8&z~eg#@a|W5ILg_5_o2(+Xlf%Z+N%L2ZmRwnuw7g zX2GsewGdO)Ad;CvpC6-IQ;Qv5eXjXyDOoe3mx>DdO=yUj-}{O(1!FizOGu% z=9ED8R2IsqO$##)I@TCSUf+@GP^m4M^=grBCKPz=)DjM^pr0PU7gfUMawt|y=EK1c z-tL6vLWk((fL0_)G zcq*e2Qf&L7l?H2tm4Qf!{P%oA_~A7$!3j%D?nlS}X*CI2EyVSWxKsJm{hXP??rY`4 z2Q=%y!F;_gvifb7g2xdJl9+A!klDQB#?cY;@PD(7ShzO1Ubj!xqua|;OF$(*HSIL z+9Y#RS+n&>92)kwUXs$=TNB4vI~$BBrDaHM5)cc9HF8NRnVqvIM~^CIu!L05m_o{x zPLd+%XxFF~XV6SH|58(hP(Lxt5=&wBE43*m%eMwSYbS+D1`I^WjpYT|szpQd$*QqI zt6rsyYW@oFsUqZgV}-@BeOk0A+>Efu)=%-9xRvoLqAXpJo@gMfmX|y5{?1+F)NVb0 zq`O`{7k!s1<8Rh10~R)U_+{eGAN~Fal|7vK=4@1mmQDN8BM~b1(}dM7o{PK}CJgwDM(}>Q5 zN(q?ReC2e!e}uR0fgx%pTn?J?xZCF09o%&5NxKm(9@h)B^6j1BZP!0V*r|A6@E6Kd z$RR{Ss9o^l?2eF|_w&@|vx5+^peba{@k%rq%QH}U1t{gig-u66MlWlUaT1Fobq>RfzMhBih35#+vDh$L01aO`Ugm6WU)>sq)-8rNTk zXbBPjK?m_e=7cnTOL>fu&vW()!V=92K*UZ2;KIiEQsJ6N0OXJMsQplAcV)AbvZJ(fAcNT}5Cnk;9Q-r{_dgx->7fRo;Qjrq4alW0+Z zb=9){)pD%%Idg{beiwX2cHy%d%CO>H{xt24!pt|J(6f(r+@AlEDd(GbbHvw$IyIV@ zUqmGEF7RH8Z!KRB^NCuIL_7ao_YbWaU`nQQk>+?;IZ}82$s-ud*TrUq!^}+5yOln? zpRe4mny-w#CP8W!Q8nBk8BM#7KuZJcAM22Da7U{soN~U($Lub=<$bo!d>?q!x6aqT zyZWc?F24Ew0};0x;gKv;d=*{d;Q`1hzd64tE8+#7(q{-o13nFzqm{eeT8kwMIQaN? zN*N>m2q0hkRTkBoEotxoBdZsm+zyg^e4c%hcUjrUfJ6!B^_atwG?$-j~ghTZ60x1K7|bb6>(+LYcpEwsA-Fr@H*nM~@`B`lc#ZZkYWBSF+s+cJC|b znu-<_NGj*@1c zK;Oz^ik-y03o9~7Tv0>c`a$`eIN^?JrgN4haqFnJuykQkRfivG8-80g0|xX6y{cY; zrH#EP|BoA2BJq-5IywmUZOnsy>{8;`{{-EM&Xjc=C72fUXhw9^rsH`@J7xazqZhB~ zbIfphsZ=kbeyiVqV*&0*9~>n(aK&Q@E)VNhB^Fh9b z+LYi*zUM}Bu_Y5*TqceLwJVf(8%M2I&b(G1P0C{0%tGZ9WyY)>NG(ta8*vMKQ; zaZZSvDR7B6?*v{a3U8ES^~#uM5;|KhoM<)pYsb!@Om8gy{Jf64brT@snvY{V%fAX# zxL-MW#1&I?jqeG1$3*)}RFiK7)d3snG57l#W^mX_G9LGuEBkQ~i3gG`x{R6aM^VJ1 zX*Jp!(>dj%DhWGErdCXFB^^7;AH4K0>@Pf4k!gkd#8ANBz?c`m1#7zRBJjf+1Tsh_ zN5GQzIQdU8uHMCnFOb)n6uN}*x+S2gZ0rQ}e{uDeL6t#%u#CfsU8u=8XBCLTIK zA4)gcnnK~*p&CYZw4EI--|;Nv9fI;f0k0da!8aPi43RXkuJ2ildGsfAPF!fd4*3;z zwgj;Swk$65HBM`hpyfRvVs#mpurJe5hjuHA<&)wK<3$l_Qz#)v{Tk~yuN8^l2`%7| zuc5kBWl%_qKQ`lV0${j&uaY=@I06kS{NvuKvY==x+k3dO_WdT!CQc_uKYqINSTchx zqRsb0fBNq7yr@vF!Eg1PW6BHi{?;0@v~ixb!Z$-c)~IQ;U#}hb@Y?8}L1N-eQ^!yw zVxZH<=ni#_SmGYy9(zHKcgu;?_oMLj8BAfp zY8ZQ=J6v(?H@UH?5@fozB>-G~x14E90v-1+!Ilij#`Pwvowj>PMZE#EgA(dfryJtr z;%Cy@@>p+*tuR#(GRZq{=Rm%uS-bj;Ul<0;LQ8T^UtYSUErK)4ad>&9>6kAIO&VEe2zpWV5iAPXG5vX zx7sBw#>hY-3?vc&hC4=}q)j*Oge8SemV+|D1skSMuRj2HBGT)b8spHETX;07kp z=B|M4+K;yBvap-B30X40TjrN1)5)vP*Z}>={wai^lIr$Tw^(5sr?*5Q(CUtE7920Q zm1%VLG&ADJ_HJzyue16P@*n=41z9HdzMO!y_!KU`^?9e81wXDvC@~IO2!n{scSlN>k~Xi#DW;FB$|y%KkQ^H>MV9hD_S=9UH#>07*CyK)r$;ooi6m zVaL`MHW=qs7@bfW$E3`q!{Ln=Qy-j_w4cCBxX#5p09gmH;g)d^@PbbQ;zi^JMhhYs z{F55-{my%eoAC_^Hj+KS0mA(~dJ7yKa>p&nm4JsmajW^h5p=B|+%N`)wlH4cmyRK(^$kWD8(-LHi~B13>{<+~GAu z2wHN4j`Be6v_TxJJy}R=hzXF~IgKFo7W4tbBo6(}+GzGiY}dj`4>%og_N0O-LsmD# zZydga^Ccr;v%M?tUnP^(ddgZ*JfzKU1U%P!J~)igN)<7k8=~|Pyk!%`3Aa8HYT25< zeJ08JO$}MgGXVuA8cy~rYxhEkF64cn#q9fkz8|b>N~D|9%GdA68kcDalYz;s5LU8i z=sXCaNEL~YXdqu9O-wG}_w>Ik?&b2%X*Y}q&f>4H-<6p>&;@7uncS%(s(WY?8#R?9 z1TIdQ>^I>Dr6q#4w;&={D6Ia;(1`8ZX{Z+6&;HA)OjnP5BRuCHkG+ZHY{(sd& zh_x_SJvbPcCL|ab4;W~6g%6mbswampg7GnBvANi?*mAFVPN_@0r@2Yyrv{}0MY|C`$YW{y}s4i#2%&zBfFZ_s=C;cqj1559TL2@i0qJD4765 z#z__L*7MU&q5KtoIViV`%eY_-?U+nc$2SkHbB^y|P@L2rzA<`iX)_ z5wcjxlw_KpGWsg9j6*5Ex+S!}T)s4^k%|`7&ynKIjLI-cZWN}g_Z%Oxjm2gD;W%1d zs;=YL)=oBkt*J0H`UtG7IJ;qmgAwOKWcq=+4-UZqjni)hMqDVA3YW?JIO0&5B3?B4 zWLrgf#+$FqTET#9+K={$OZ3SO9Wn$dmCp*5EIU+ienoX1H4QiA-xoOk=yvxTCdy$~ z+*S~y;GSs1wwgb^k-$QdRV`Yj`w9f&2Uw@VC|3jHmG_A$(moWt)lO!X+O>zGPkfyLIgg}+KYt4`Ce&h!5dsrj{L{L4mTy8!db@@ygY-K+m z1GhZUdvrEpowOZ$ann)thht%jI}q{NwCUjMfdk;>gOJq;g)#O#Mw@LerD-HAMzl7BI;t^VGg+tW-&|#F_%5%M-kKV@EK^& zgShpSfDhxY4e{~{3=4`)$9965+*op9e!pu;@p5n*61-O?@HtSuXBy>?gMyBpc9Md6 z#7X6v$mdJUCz81}k$gmqCh>!q57OM$lbgD6ot6~pFLIeyT9aW?+RV=e3ye#d&Zb^) zI@j__6!HqM-)Dl{DJ*$j_v_Fc&CXaIOa3fRfS~o6fXpp7#q<^`y>@R^t3KHNTq7O2 z&9`ZHb9|ITGoTCGfVnHD^)MB>Q(n`#30z7kk=#;swxzM=Q@dg|A0sv4mbOD_0G9!w zR^H5TwV-Ax*K$k&ajx=cC`n&OVa?{qiNqge&%|`w^%a^8juI}ye!A8~WNn8YjBnC1 z>@ohVKu_a;kJ)vI)J;5TLKN_5yAu3H6=w$ac+B-^>K#QSqV4+=nVF!EepB^sbZ{AV zU`8)x>De2r~On!yo!`SzuCqEx^17rDSl!&){{}*9-CHHr|U$eRN-sxVvP=LF@+3N^0T*l zZ)&?f*iXKO`hW6w3nXlq>^T|O`qgJ$uyp7kI#k+AU z#;>dG9kjdvaV=tPoA1I}!OwvmV?>B8nO_-?6;;}qUG3RsY=IWr=Hq8+yvekY#C5{A zHl`#vY8gAZYHLyt?(wp%N>_97Ft>m0W~zVs=8uV^ly>iX8X#C>Ck0dUuV$kPm}F|_ zDbitwola+YhC(LCGYBkhcw@Geq{>GdLRG<2TJ_?^v0c(aPrU7M%);~%odJM_0oOY?K&0%@tR3ySQ zs~T|+mfRacCW)wzD$HP+$*ah=dUFV)zh8H^`$XcXAhOg!^^Bn31p-T0h23*(; zY8Z($zrAO&YDC5x&vP%03+9eM0!jZ7d|Nq>klNz_x$wWlZJ~r7cKHpRG`+qCm3^+A z8)bd#F@=IKp9JSt&Qb0WDPZXF!GZMM03qnZh!j|D`;4LXL9|ve>=3ihqkHNK1KLzN zm>YrzCp{ zpeih-$MGzCq=W*kj~;EoZ?&IqVeMi71bvcqGO1+4W^)0p104;Vjf(otv+6ebgZtt) z&cM%5t`FBy=Fs?8M5U-nqM_5SiG(7H9Z}-m@aFIr2qg_CAmKZY;5R?SIpJ6$_nA_f z_cF_h(xE&Ude0~v5jPPJdYS!0G^RQ%K7cY=R> z>Lq>ABpFo>=C%eOmp8~JSr1i9-W=-XSHnL3SK>NVj>iD_^;QA*I9q zL{o#`1Ai)V;RAzace#!NW=+yb)1<3i*?=*oUzr-lA*g17OjyA%k15}pEIQ)2Gp?za zq_0y2%w~}p11KqqwNpjYW}+vhNvnF4on-O^>(bNlGuv3$`31#Txrq3s4i6~Lqp(J; zEa;M)?E2*;pmi1XET(4VEe*#H0D(iO{Tx{;;7VnVhCM!Ox+Tp(z#PlHr@y((pX0{j z7^Z9;8AkS+)iC|EWJ7BE1E_D*jQp4~t7|Tj@s(@3Tovny1Kv}!S{8QE2*We3mYg7q zOj5TZx6&m#Cl+Gt;(6PucvBJmrJ4yE z1Tv!j)Cgu?%SHYa};G_40(D86NVVs@Pjr(Moyl>xZQd(>O zec?`h5Tab_V)@U(DrL1iTH_-5$iaMJ6qzQvcB6ccB?rZ7 zo$t6ZRqmD{th^86bVDPaDNqpk%Utf-9+S(3j^MPtP|*PP-#WZ6mm}X$l%es4nootA z7kNYFIz;%8-Fkhy)_mJ)c3q?STHBwbb-%>AEcL`;Oj=EiN@Ig>cX3f3*EvCt8omJ) z2L^-TBjry(SmFk67xSP#cp;T*S|PP--Y(^9$}ZJw&MxB%b>HYqs2Ae*O}KxRRc=e- z8j{cpvUr!E!;5se^(C9%=ypJCJ95cW-rCqKOL$vbsb(yh#GWliwZrxlSR*#mLo=l$ zZq`UbczfpGUH0XwLIs>pbFTh4TbJ4rm!h;ob}0tl>Oic_9OLWp)$m&0^i?x}rm`)0|!Sy{B0Q9(&ub zBrprcq2=6h=0n+6ezCf?5KmRMC-P4*H(oYmb_S<{?{A3&JI(|LjwC&8yB*>Cq}6yR z2U;UQcM-3U3|Oh&*<~QYo(J}v-0BHkFsw?s1lY^WbR8Td4nTr;#N#A`hcfoDAZqeOu~W5*f2o~^Hy*J{(+4$sPfYGb3B;Z>y* z0@xS*d4FAQr=H+Y{70^D4t-)m-l!Hk#sq+2k~mYG$&R=VUjoA9*WF?8#-w2`HXI6| zpjlN~F8CbUk!Mze@f;c@D*}$mAH;n++)l|F;T@T`Aj>QIxK@g(IXz^)Nch_~nl@kr z|JW+$Kl1wUyEV_$&-fe*L_DgNTb!z*)U|zr_a|KHD*`ptfky$(F^rhxB(=uu1G|Oy z_`~jKF6im)eNsbcW~cHU3FuN1jI1umPg-cpwu=Ip-W6e-ZZV~OhdrZ$@P-S92jc&% z-7nIHE@AFFtvS_@d<=ep%zkz6oviK?i^a3@vhTp7=@sNW`KKlbol zLK_HZwOl+F2b782&Q&cr(cj19@URQ01(~o!794%N-ho zt$4pC{QZ@2uI`Xmj2BJ(AaK=t?8Y3Mr+nMN>zePh8nrsh{H6&z!~nSViM5hOk(D?c_h z7zpM;9T;^Cd}CX69vF=ylT^uI(~(!@2!$K7*(Dj1Pqb_as@Ovd7N{A#zm)b9Bu+&M zLU4Z57l^eL?GW8W-Kv@f0utMP$iS?USv!0~AL?gf4V2Qo(hNIm$p?!ZBVm_KAdA%s z5I0X?v%Ui-dF#K5cBB>AV;ku}J7~tEUQi4bhy@;$$LI`5LY(^6}i5Ix4W)OvWLOGhaRxpJ*ZGysF2N9Sm3W;mr z(S^}}ZdvV_GYMumFfhI^T!97@U_l7_x%M5HqV)`%Kf?W_t0R|+0Q(M(CTc4RX37sm zqg*|gh$7icV3_p-y{$N^iUMNT#T-|<-GQFJtuC`l&)UNsrX8P4TDu`NyB6^1xBYlc zeb;dAML{|)$?_1qede`w=_*|Fw$YvIkJW?qCO2R!(ZLiVMWMcXPqsxu8ZnOs)sYBP z+M?K-B<+wG(4*`?a!gZ>W=F%?X^ilY)()9(8hBPDB0AhP@V(v?5Exo$AQhOpMfbfS zGVJ6IdAxq}ClW&GgYoiD8YSLa3>SNXohClq)rTeCf8H1H6&;`!d%~c-GtB_2f-Udt#+g`l1@a?~X&@ zJ$jUWgK6Ur`_}&YDjELGTN3mI16Bw28iViV6plF;3sxLZt*MpdA5ys^Xs`S}hA&BC zN2XmZpv(J>m}hEKJ|3*BD1U)3a6(#5LtgUz0)MmK{?*E+OsnT6@#4VBrWOdyt3aC- z`yBwf3Cqz!Qd2{KNL?+*R$yGuahsNTZ$n!KXOw$cUd_tbn)2BzlR0a3wioRQBic;2 z%4JEG*R&TlrtxZ9_Fu{2XUr+cPtV9Hl)K+=6LECg20mEUg>iwUlrn*ne3%KksvpKU+0837xDu3EtZn((VNxf z)8Qg$5VO_0QCHCaDx#JX)s4H+)hN+#7=hVr^_^{uhkK|X>!R9&moOFO?8Hm*c2iA- zf!Led$cxg;b%?Q=8)ts+ofgPj?u4i#-u z5^^x>x596S-*D1Ad=j!diO#B2_5Sw8eiViCT&0<)_Y@k_l60A9nx8n_OgEqy$K7>? zEB=Kzhq?f>4p`$F>7A)MNQ*06$4ZoRt!4otp1Glg53!MZ!c_wrO4bGfdqa%a z^0!KXN$C9dCS0bxQSIsnA@NE`eq%SMk`D_tW@UC~HMmdQPgOD7*MA>ziVag}ZHsj@ zJ#~j@<&DO%OC5Egywy8-4^Dv$$H;77*ntXp^0lR66a!FF;!R@6=$ac9n0Af)rqi&A-u()}i?b@$)`qI!&{v@?l`0vVzB8)0#I?j_Za>#M_d)+?yjMm{ z*tpw{a?2mNZ*Qy(vv%n5klvPHL8zioU`hK~ueMozkMnLuk+uZ5e#NEBKm5+G9BedC zt`iNP;s~5fvU>Iz*1yMOMzbWrbX(9;_v?*sMGJDh_cnZWlYp+#Ll>vpNT8UlLS=M} z2ElK|D%AB7Ms-GRcA&Q>Hg_n?vHZR(8jJ50^;bQSBePtaoOutR@!RBV`A5soJ?|FS zhrgMulu5J7c?*ni>0i?UJ z)9&cfQvp?7+t`?4CY1q^w?_TQG_#f4TJqohkYd4A_~ zMFCnewD{xM4*{g-Xx7uN&=A_NAenZc#G_LqCdux2G$#t(c^IH`dV_ZVYX3z$;AQBT z=rcKFD`&(7a6q#5MHJ%N6Y0PW$0QHZbIgl7mNKfhgfl^%m{D7u#pZ_}7r~pwj?o9usPx6l%{F z!1y(2^IAJ7q;JaFyk=>8-T+uyeQ~w=+ptmF>n@hHIl~pca(G(=go@u|6(@vo`^g%c zIg-J7r{uz(I@f(F`BH(~%N2F%Ua%qKydCIMi>|g38eW%qaY-2>$P?Xug)t~>-3ny+ z@oLT!(w{14c{0TEvuY(VsA&)JcfEcaqQ)m_f(?bUu8jS zN*4AdX*^Z6%a-z#{*QNtwG*>1$0mj~%e~@+u&NQaIpKr%9i>RDq})bIw$wr`lt24I zG)369=s{Nky5cdU3hiLo77=;?&Q{58sHc7OBO z#9vCx7iA^*WH#HT!XS{&J<%^T;1v&BE(w`ly$#WN_$Z{u!w`DIib!|%G0FY)h9r1Z zflZkhBr8`!BvSPoRXMTZsxG_?p$sBu;#)>0tH~)^-JRZ{8E*{_&w>vvG!>BL6iE#- zJo3xaBqA#Cug8%Xw2LolSQG(uF2w3N5K<&=FK3%iQ@k(~hO7W> zP4C{I(D|7qv z`H&mza#s&dtcB7x*G(3fJDY0meR)o2rx&|4pZS@{6`iIjV{qh|K()QylU zb7kC#fG>#CbL`tN8V*B7|srwE4^OYIyGqv9I9QGR_NITYgpYqiY7h zXcRLNZ7RK7RbPuC`|?b@cXif2%ocZ^t_VIgiP?s>sjL*srP-9WyusoZ<)n+-q#?)S zBPRLuB2&f?I4UR5HkDL;ChpgFEx9-cJVeMkPYW$xWmSnmnxgu+Vti;5!iU6n)$Gfve0(ObJ#oJ;u6JxjM;hv5MI(Z!AG621m! z=19^{qo!qG_1@7`NE&%+y~V0(6F=XyenG=a&QY6LN1Sok2guvJBa#(&9|v7T-jSSI zG$k>d$}}j~u8_neJokjm-TYrZjfqhhILL*mFr>yzdx!h81QEvk+Xzq3G8-MwK|i;f zmhM{$>M({u2Rne?-tYZ(z(>KuI_IfVPKYcq_0tiq{x%V*d%ZmDh*`@HQj`{JgFc);XhJdRc}v3N z@Xo7)JlB!3<6d!6Ey^c~+&@-KK7zPy8i{p`lhf-VhJ)4Dsc|<6MHWbmB0Jao2}>%> zmGd*i{X;r0>Z%q64mQ5Rv&#SO?f5{go}{IWSy@_SHbRx6gcd%H_B%p|BPc?O((3*`q2VTz(}5%&Qn-6+K9*nj!6c;$$2Ikzo;RLz85gRF(`wUdlnpznH1{uY`L zaRwx(-1B>Y3HvB2#Ao6N)0t?^?_BNv!E$6h*zXz|Qca^NaL}kH#AxCaoYpzyW%^M{8gT=PWZ;yQ?G{mKniI{# z=DbR7Qx!ZI@v(|ad%lF@r4>vs*llOiC#SUUIh7+f>Mm^&Zrk(i+wT{h+kR7*U*HHr z!11*LEWWehP$-Ho&vp=!XB9NIvy67R=R|m-C?6sasU})Va!3@1k7>MxtRFVN>7a?G zva;4i~Hf~%L@v^fIW+7MI4@`BmyTg;Oz3-wEPlLFbAK8mq8Hu*i| zwiS=Su)RL^tR;9_wLhcM5et2Cu&1l)&W24bNhFhrMne;rw+(GgB>CMLMpF|M>?Ijo zjb>vrAoA8h3C>KS`G&P3!hs`vSz9kPx!#7!J(+1!o2Texr^ ziTb+e#bguW&d!GHrGwleJZY-2xQh#eYpaOBgDf{+@A%A?$(e6WE>yHnRnXas+YfGi zDNU|kGAEUYQ*-=Ke-CH#Tq{Z#I05GRlk3&Zd=8_YYN95CBn3b6V=NSy=xqR%eFLEGR6@996rR)QagwS7eGwNW z#=m1x7{+bkNaP-ydch^y%;B!tuhv$YAFiOk5^Fctm%2!>7ZWZI{sb%mv(^}uG5_`HE%@>F$u!mW(7%Aidi1?bns>lWR&nv zTpKs_YS^P{G-q$f%JcK5DpkY(IBh76lY#wv(K`h%=vl4$t1V~7fu&s7wwo@zMqFkC zfC>N8jC1k_VclAT=!hR6yl@sH>30gfz4HSiVD&%J4()ok( z-@E(8xhU~+d+Q6N!qx4&>Kkg&lj+lxkmx+*)4p)QGdRQ{A#YtsUdXk9oK>O|%$aov z#aq;s_#5@pYiiyTi_ha|?qlSURMNCP>`iNA13*Xm&}&a8C*pR1 zq|Y<%Epx<~{?qa=wQzkO0uGp+E&4;kv*8;2c5${}0bz<1YVB~%M$kAYvQPk13|kk0~v?(>4DyBm8@ zNlukaBjw&C?_Ay9B*V^q;H{HbtCqxtDc)B2ruS>W;3SmGaBV?+Y)y*#Bh;le3#lTI z#U5$F;a;U_N^cJIY6BNR9+{yTYZ&fMLaFw<;uFcecM={gfCu&z=;${3uT5#g`g@h0 zKHR;#V@ohiFu*TbxxjB+%x#+L1*+=R;Y#rViXkeu7>>OGwznPj55te37K6X;5D2ze zZ8xh+A&k@S%^iM;7XG;dwBaKnH6&}cvI0{(=txkcC7RMV98)|$hqL0E8sfmGc0Cf_ zJ$4=2j;YjC&v2FIfop^V@69fLRpC$v>VDFHcV53Guqy@2x3u9oksP*sf|GI5PR|}^ z!6>+EG&Kl`OCb$Ni0YRku%1&L5gw0pmOCph<66SiEC4Rb+zre28Q|3~$r3A=(F%7Z z*lf3vYxqbq3Ny>Vc9GiSU_x+>`n)sDpPO%x4rn(k77|WpSydMfu>k(0V`Y zI=ZgSfd7p|j-fP}m3$S*Cto+sSLUDq$%ddo=puj&Lx_RCM?j&8j^)>Ds9H$^GDK9= zf`-=BtUoCxeGKdh^(EDD~<<_WwxUy z|2>lj?SHZ#SUrQ^t;$!!)fosWR1QeXV26Ma66G-vHG|L@86eT9-YT8{GX?6?e!Yn) z`OCjFs%FRa2_oG}StjOF-WMac7w7mN7ESYvsPvobQPwZsZGCr(hqt%ed;9>{IWj&J zheArS0(4_kl?}j8j7O*#IGp38S2CypD0%pFwA~(ZRI)vY5@-q>-I!(BS#+QYjcL51z zG@Eto;{B`|LinDW88WABQ3;R_EzDg(0YAy1s2Nd04O+nXr2Zk577Z`t-i4<1tFQ}# zmYIZ^534SF*5OC9eeGSU!9Cwmk9A{pz4-S@Sm>h@d^B>PukQ@Zk|vw zURp+k#NnDM#`-Hoz;!nGz%`J@Vnl|RBYD9ZVO>>Zd59Z|o!BmG83MGNh;-0*>I-E8 zZ%~{tHtbQO#!4_dsYxRVi)@SQQ07***Q-*&^c#-M`aM&AV4ImMQd)njCq3{^k zD`Lue>Ebu4%)2UCVsd`Z<3*0ve>EhzJzL2S!;zIb68;T%(Qq?C)s|JaROO<_j?TG8 z(Xeg|9KvbNXfmS-B>~=JT{e&-+WhUXV?orMidDBTn8JJYpx1%OnZ4sfTWi-vKPFhK zbGhSK>p(zK=$4%I&o;iw(%+^2od&b}DVzPtQFc;F45SuBO&=eG!8_0Rxqlmb1VGL{ zI@u6kIKB4^nmoI`EI5VCwm&Iu3Lal!$XF#Hup|01a+i^OX#qxz2ecNBiVK9+RQ+_vlE?hxFKMi3E2EzI2$Kk`xKw>9y~}rEs8MarA`RaCVk= zT;0Wx;f?!pg0?2K$O{##`vtGo7f1^(1YvnJ<#-fu34z1vO2EM?+9K|jG2uP~s*LAZ zj@+t^#vy~(qTh@#fp}xY8iY*Zj}U?a4oY0FIP{avQno)~|0gr?aA;&+^hKu8el^3f zf5ih@5YHA8uqwq~XRq+G7}#R-hpA{?*eX?{-jL8@qTIcXS3Xfs7v z?;d9n!o3vIu#m29(Fi&&GPeKIW$!ip)GU_To20j^_{*nxLCkb+yAB_5)rZ+{+~;QK zj{)hT1}TH%;BIV~MENQaFB-daAAWRoY2_{8!+%}(vGtfc7EugTto6poO~_<()ONXA z&-;eE!HlEZcu9aq7vG*embNBhcIocpVSnN zY7kS~7qN($@ni-8-&iV%_S5%A2lFtKJ9(e!*kTAR;ewklF1#_%@)`9^Tly_Ev3^N> z(|K-7lwjt-L_mzLyFC2+3-)Sy`8oaQ`HR1O36(gI4gPLWUaa{u z?;mZFcixB)xg4=|ytJCt#K}LfCE1#GZ|v>pz??d)z6q6-w{uFdKx~L?Zgd^yJ_hWL?59h zaC-3C88>@yS5jqJY-v^Lu846`Z{A8BkorEo>I8YtE%zOfR3p-PbOMmz&EB@ z?L5?Hj(13;i65^>|GAkbfL`AU%S(St1Vh{7mXX zK2?A)3lBvvP7=hVmNQEgsFCVD$$U_ywm61?+bdK^bek;OI=o08^l>J?T>yOjetuVd z5D}n(`PzI(5DIb@p^^;hKs`%mdG!XONonmK%t*Xx)&8=?n^KLuSr>X z-Aj#D?E?IB#%8vW;N%LHE32KBILwF}ypo`tfI4J}CX}XZcH%*V6T8CD@3~c9aavxb zY2&S1fqTkXVW>4JyTx*^u;_5&9@mkEIPb*7uAh730o?58)LMIUnfJgQ;H)TM&)N%% zwdkx||Fh^4%dp!~{JW{W-2TdWoW`XEF;U~a%N%&NjM%=5k$I>o|Lw5E`tO6Tf<1?u zi{2G9?ipT$JKn;BL3_e{D|VR3I0Ik#IR+7Ln7M3AKg+>=r#{E2a%I);H?eykP6M?` zo3@jcFr7(&ZpnMT#{d-~_+quoU%tKBRh??#!~;MF93Iwp#Q9FDEd+rDNsauJeHuDS*M{d5;-0xt4M_C#dF%Q*0q#8+v<3FRaqBg#W17T9B(< z`tHtH4SvcbtB{VJ;=59@4Pd7+%hve2ax#pt~Mm zM%jxz_zodFtKIW@Cpdb%;&oT&1qED%_WjX}nn4bXQL$?gEN?b5eS$sKRr%}#dnsG= zAWcP+X%6m+eVRte$rpYmNDA0yt)+>J0{)z0&wWDOH5e&|LJD@i(aO0nsl^bY{RmSl z{!#vfm`{kf%NtE6SfhbwA!5<<)zrV2;|=elw9GbtG;0jtTxo*AC-oZ zL59<~HmG=DKuse^AP2K4h~|xKVG9e|SE`C`>=XPy0|vieM~~`P_PhBC8j}AvV0>&* z0*loY9Or+a_?`K-zO_kMGw=%-LPOlptf8(7iw1K!G1cY8?%47A{2Cq)#&u1CfbP+dJ}U?RcvtUGP}FaZ zu7S>p{)juLHRxRm~Nj~b%pIv~`BcjFP7QsCUv#tIpen5XZ8e~#)O zsRvBkU%6`E{G}3QF5C(KmO`#2xok-P3H$JNF@8}lYVt#_LrW6|c9tSuhvl&Yw5723&f5^ZrR06u_Ir?~XQ2AtN@YReizq0fJ~#PL`#AsYiqum_RLnfwZD`|x{++An&*spIGS`jbY9=?e>&{qRijUv zEX>kU9_K2*<2%2HyQPw3R;UY;Y7|~Von9M>9~8KF%|JN}QpAtoT|=!5qSHtQG#ILB z55Z?sJMj?v9;J5m1I&U4l(8zXZ_lJGyG{?DBk56#bv^Hp=bpn^!ss6p#VM8H!I zbPbHpPOkH!(}3a`ljy#(D*O4AAcUwzT@^ZOg*jgY zfi$L_l0p_J@H6zQ(>DcOyc|Oe$D*W)bio)O zxJAF)g@UygNJ4~|4~HCD3yFL?MNTRZHJpBZO_K9-3{>n1uXKAA6JqK0%Dd&?g~7Zd z1IJu{B8O&}dKDF5_noiJ`i?Kvfr6q#Hn|BzbGK@bld+icb$Doi)+H}V0a__&+X(z_ z8cOoEP2*+B!@G`fu;MODt+^=H<@kt zKgN)Q^*uZ0yFRTcC9ryD(J=5C9sInJ0f4_P)X}6gRIE)}h+4(AR;ymp)hIvYqEA)` zqY^kY|C&5is-b6^kqb5cc78;0PQL|Ry|B0jklk3Y8)P9IRQY2SWkYkyXO*w#TJU|z zVXbm-q~V>X=c1EoABg}%d)1m|ttYR6k-P-4qM6O=mzcMHG?3mSGZl?L_7n@wam*9J zaa=n(B1SCYYp|{g+$Fqz7WNI%W;1O?$3#B)>mOMOMZQtnSR*6d3_#9Y<$(We;JCjxS{+Q%`eA)0=n zuzj>4=w#nP3gA9M7D~&3uwgyKIeX;=t>~@GOok;u0hVL3WC)rmYxQ07t5f$-rb+;4 zkFapqjrg7!;^2fAO}ha}XK+IA(pZ9&cxo=ONhdY@dt`A*+e?)lO|jdyA~R!Tp%fu; z(bG4>Z4Hq#&E+p|_Gl4rmNoxEA?2pwpoZ^IK4~Q`FOOymv4xc5QEk)C(q_+6_Z?LFvWZxaA0_Sk!#7bkTb1M7yW-B{Dz@x-L zx+ZDd${=8Te5@t3EeU!<#rl};Wi3>+08C+b2o)n_5C^`W8bw<;tN;}wJX4Y+G*b!% zQ43m98LgVk<|MtM4m32FaI)KgO40hbPdp&SfMdJ^%c7vTs&juA1)y)V>aFUa3g;9J@e7xKfb;cpwgKZmpy?~#GT<_ zYG&0C#{Ca`({>mDNdG>datzK44oEBoY_bHX450IeZ)q3uEF0J%63B|x@(?Cdwg$5) z!bmF3^GumGU^em??cnR9*xM0FOzr|dt`-*J)Xb=!rW9`%C00pIs)XOBFB=gR0@f6% z!+9c~_vFTg9cjw9_n58;!v-H$X#Mj%UgKAo{fA_(5xTIu_o%NkqqSi2|A6X&SKp#s zN!@>EtKC%+QK*4{dw_uRJN{(1UU7g2wXu_S%MABqNd_91#tJ94qN z!Di7liJUJnMDbm8y zbhsX^5`z`7%A52*LAIn}SlA^d!gL+yR+6yTv%by&pI)nRwh{Z987f!k%Ah^4`1q)7a%b(=kcW-!i{a$O< z>gnFQs;0WC`b^cSefS}A0smvZC45*M|227W16m6E&;PyEb$mePeUuhfxm+ecY zI_7QKdmJ-f5(WUCpjjd@3E?nYD3s+AI4Wk+`BYMs%_%99wo{|Gu>yB(ypzedQjKxE zHiwy8TmbUgKbp?c*Bz##|Q;ugyxO`qu^;AUxE@3AWrV_|40>uH7fL5x6? z?mSvFn5RBhS1DGj`Q#)}W{~5qUmnPD0Ch?uQwg|_IlV|270*}uLD9mv$BmPx%cbT= zt;beC=m=Re2|fwFq<^CtqvhOVSTYlTC$yjFeZwLNVL~uzb|E$M=~~xMFlHIiz+-xT zqV+-Tu{X?zrtDp?;ROd1qSxqR{JULaS;nD#xOCiEWQf3llI1pVLUTk0gORUfCpgVP z!_a_a79yCM-G^oJkOMuP5te0d2wbYqO@W5rF}mUKGOJg*38$X??U#$-RmZN{SU#^u zWERm1gxGMKn;bwS2k8_Vav~*gh|L7;n}pR<7l`kt(N#l;!S`l|oy6mjI>&h?3N*2P zT@y7&Ge5B5VCm;g*pP)E-sg+0LHUd!(jWqGB(AY%%z|#1X|*M&=$&)`$M$_~D?Q*T zaZU?SfFO*r+W*GUi+JhAxLHw%2_L7?;Q*zWBC`N?P?Loy;4}n|3NzIyia6BIZkTm3 zfa)EunIoeZX%9)bQ(`|QeIw^IfgI>-u(%djp_?; z)~XNvwv${SRQ<$x*Vz?0A<)An9q3q$zEf*-!p<<42b2{kPN1jt2*0!lzf{zmSA!b! z5D+y}0`PnO&F@5Gu7cii{qsBhC<>K92onQq65VL6G=C z+;m)jK?E%l9Xy>GM~{-4qiQc>h{vd1L$f-7IW4&}j%hJZ*#cJ29xqsDnn7Tvi}kxT zfJGJ&^``K^#LO#)-(gLHbaJ@J^s_rIky+qo=LI?@wCQN2Y7HFjf=yFth(}+Ud<0_R z5uUw9GfUwq45l`d==Z@G>!rCNChT^d#T}-dE2Lqz9vvWm%-iPRuXOBR()Qm28J`;g zR&mrT5QyDMjh7J}yTMdVc)_*wa%D9f=NY6U;-Xk9Nd?IZb49j%0pV4TW_yVn`7jC`e_>9k^=Ds1`=m+I$^hk7~7 z2SWjmCHA^C4oUgF>Ur|F+lpVdukHi6L5kOFHu!+FDj9C|6uzsBd8?3ZlU=iYrr694 zx1pBRXXd8c0`t1bLN~8U7ZwHF+}I+8>}eF}oiK>O0s^mypxg-pBqj6lcug`fK&lN} z$~wewO%?18)eXw?w^OL&LIGJ(<9w-V#1NX~Jc46VZ`3ml6>_nR6qX})<^*Qtc-?1& zL}W=H)Pb5Iw==OA53=Sc`b6{Q2-IwIY+s_%)Q2b*<*RtpbrjFg8KD`*gF!@fBH!2^ zA)|NgWxkhd8dg>b{_>6qp)PwqnK1rdQ%+T`%BA7U&zLCv`WG&Xbp{%b9igAGvst6k4cDs$mf z4f(uv9DTn-ryaHanu4T)I6szW0i+@sV}`ZYd9E_Y$YB>XB&S zw+?o}kdd)mdp@^8O9H&gO@1cPQk&%!M(vP2M-c`Mf~LyZ_r~j6I-_iyU0jIX`azzy z%|!0bDZDh?EptoCIhuF$u&)#a@p6;Hr!5D?Lk2BE5pDsmG8+uxt8$0@9Zf8f4d)w5 zPd~c7N49}X8*0LJzkcm8I?vB(rQOE|p>sP>i{Uz%yzt-|vf?^{_(i?W4&P68rsAS1 z=wrL3B_QGp(fdfGJdIL?>5B7|B8z7&$y?sHnIh1Ev;w^$QRayB^EN(8!`G;Ihju8B zytwJKHk-VF(X|~n78{8W23#WMWuhj*Y3^7L^P_NBG5Bp7)|JT8k6%r3BYp}#0SFoP z3A&}4<|aubW1$)<$DT-F-}iU6Epb7spB!ptQ5qQH*v8sxC#t@|E##%xui8BmJTya%@PzDY&Q)0 zrUv$v#!f_6)Jl2((SHD~o@qRT#1Hy_kzafZ-D`~0e%!5Ou7I7Qx4nslDf10)d)Qno z4=SLa<-wo!x(?Ho*5GwM`~j9-6PtD)VM5Rz#7ZyZox)`2Nj!yVBTegrp&Pvksa`>` z`Pd}4f$UH8f|x2EBR<$<)DB&#S{ZAGa^yq3>>4nKc*|GF=V3==%>Lt|wiVOOZx1PE z8KPf#no2V%l~Y*4&xA4fI>CEH9sN&3&qBD^EddEc6#Wv2_}$PI@^Jtv?|(@|2-a!W z9Z>aA%u03G%wXh)m2E{9z;Y?+!0Jey=h_2J78DjnhK>quu^)MT=`K5oH)7FFZC<@4 z>p2q0;CCMvOz}Qh5q|7|aEMYAVp}-dH0l-|?WPjFu2Y-JU^T&O)kL(TKS2md0=Zcm zaU8)v0o}=m)Rr7$B>|ecvfkMg?|;0bLfjd)CO5tcJQUlH*$nZ+Y^SGmq2H1w3v-%^ zam5MxctehQNrqd$wHa5|e#~B3HXg=-8&Q*|l#bwNJm$J@7)koGVBFByz5P;ESy-ch z6A#`Lr=4R7;yDxsRnu^SRj0JNrP_!UV;5hssMKV)svcEcPZH1tiwrU%7A!~Rg{+q3 zdALInuTrW%DN_?2WZlvotCX^5K=2!a%MN&zuoE!1!-q`G6b_%fxwIH~64y0a_$Ul7 zYD+X&F^TSG*ug-+kKXcql97ZWvZnq9c}yRk;G0Uq)e}|~4O0}{Sq)-yJy)V?`G#vm znU-vg)ep*HA9it6VM-UOts~F#@2MWTF(V zkiQ(Z-iL%jRDp)AHmLushfx66HWB};4WW9hfUb-p=)PQQsx8B)pGN~3QIB9sn|JFU zF_VgeDyM|_+-k#Z>e#w`#3Vu7OMS*n@hY53=)-A&4(K{}YQ+X=`Gl-=Cyyey+|P@y;Vzyg7h)wRVQ;zM;l1% zPPWQ}P0g*H5Rwb>=4?xDBGA6_SW$)pKAWCyN{*g5OD>=#thb}(P;K9rigx(SdaLGJ zG%+dlevs4$J|6g3k*EUd^34?%9Paki^@{m?gN<4xTIb2_d_8*c6JjD@5Dx}otJIai zaP;&_u71!a?|39C)`=trry39FQ^e**zDp(yxx08|DAa^cA&^>LYj6c{S0C-gEOfs? z=!%k>bcE6-Q73On%=OG5MFUqmd zIlZ$-X+?ZqM5s|yimAE8TDjpJR)7Gd~c>wg}|0m zK0UE9N}mFsNsDp-K*~5nX^?g~he9_=CAbQ@Y3hs^X|T(ZM4cRst-<7NhzXNxSPV1H zGq~#ySW82B2M2?wB(WmE^(R$x1oLM62qJ5?527L;J|?j zsHtqPb5Ao}u*naK<5XBxG+cz{u4@jjo}Hi;YU5F{dyVGpM6Vb z_CAL~laFe@=f>S`ITmx=k3w$U>wg;KUFYR*(r^Fr6V?E=jPE{vI(Jx9R8LenG(z$s zb>3jeIspMs1`i82;jqy<6dzHBsbe@tqs)?Dq%MB%Pz`bhckc^zBw56;Gr!!NY_7j) zq57-4LJT7vO$gO|PBF@Z5z)xtV2MBkh~B%eA(s7Y5!FoS?KZ+`vC~0R{qhrT3BBJb zee><5lf~l6O+@D_LBY&xqYp%-@JukWb0peS(mJ>l@YoxtQkyt=?6jG>Z$G+_LvKJ! zkfcQRO~XAS20wn)I46j>hyHkvRa(n>Q`V4YrkERB3K~S*uH{OLrAm&GmGr9-02C2H z3XQbkXqZIB%rG9W0tLbu=2^NQ;oN%dRMRJC zdNPWxuTaH_h#NoW;7}-ad*$hOv2?c@*TTPDXJ5+2wD%}y5&JsxO+IBTT zz@G?8vbYeC|A=!%fmtSRf?9?hXeCAXx9t^CK?0ChMSqLpTQ^8$Soa1NBZZ4K& z?MDFsdRA*sD#O77@4q&>x-V|+)asd~YB}nXn>V*v9JB?snxa=e?tN^0D|y~UnrwJWQ#Yfg${ioL0yQ0EKY+fk43g>wM#sdk?b=F6Usjuh{Eyr#3#CD!V#y=^| z5hybti}u`cKf7nAr0C|WOxecH$eVM~94#bndX?QbHc@=bk~3dA25v2c*1O}CEOQx0 z&EJM))HX4^k6J*2W@)=eMzYBg+~L+<%EB;{No`}9MkKHJaA0b!(95`gBRBaxQ1g}L^+*PBGPF8SD4CQ(T+|{7gYiPpHQWa> z!Gc)cM)+8!9szhdzW`2QYlBS6*cw_5;A)5Q41G;eFi=D?9R&y)5qfKwJvrK*6YJYc z%QsyLiSrfrtA02_S_hh@%(DyzdfvWv214an0=Blwt?O}CSXi~aP?e4#k_YaXG0U6X zR|VzAUw0cK{)B!y2$i^KLW)5iVr(L zDcW2Ja-USD`_Fy=^1m$BOl?nt#My?QnIjkS?LIdCVEGKFXoE6fq#{}nVo=gxfd*PV zq<2!#A!$79s9Q0z@2zs@3Zbm6Ejeec4kf_y7w9U-=i2An=Xcb7+k2bpPhCBID^y5M z-A}pM)1;x%A0$t{IG^(FWjUYlc6gtpG>x}85PW6uWCURIJIHVrt2_7gnC^2zQVHyH zic|FWymrLh;_3lX>#@qEZn4MHw}hlpg~;k|P(qhO6Yr#^F zPs@Z@^oY9H55!NbHCmpA?cq8NDvSt-+7?DFXw6b)wXuzUnuiiU*!+;L)3IUg!Fpp*0ULU} zU#modRc9PfQ?|U_Db>tMgcR~FMcl0cCePo4!fL>+^P8!E>K8JCy6zeS0gvd_Y$=wh zO@%#xHD*+YKpQ*3BB2}BJY*g#{}K*zkFDrZ^LC-RHUhkaY1$eoO$l3vfr;G`DXA21v9mD9g8#)Cx-v*F#bpt|)d zM=Q)MW*k(<#P>^SiL7MNpM@qAKCbi`So45_1Wt8*9+`z28&@J((b<7b?Vv-mt+0xQ z))8@2cc#%wsldcg;aUFD11h5szVu9b?jiw0g z5mYV`6_w{5xstBx%i=e>667I{8IPIY)-@Ci<_5Lxwr6utN8$wNtY(39Q~6LkR}wf% zF$I_lZzme->bu~^;mwe(OeR0@6k}8o+5rr0ei&%5z>*D0slFb~YnQ?9CjBVACS_!= z`9^vG4vQ6g%1Cm#`!OT?;}{1Jb!u(BnxQyp)I*h>ip}YMqsSajkc(Z5Zy5*VQ8n#F%RX9^`6Y9oG-Xx#Z_8xt<}?#O~|F+;mh-+N}Qa-4#f zolU+&y)#v1v0?gzqD>ba*405ZmJkplIeW@i%skMuL?&3#Oh)L4S)$EpQgmUqSO_kp z+9N(_IfXc`^l`{j#09~7zVa(k=gf2E2;Q#v6CxkN;-ih3Nh?pS(>U&9*I<`9to<_r zB5A@H2gR6ED0mAwn#ma>jWn>C0S$g}ln)h^eq5Xa4)GatZ<1D>Z>v5^rKwI|%BomElQKcyywN}O|lQ^5$w2<>q zvC}Lf2lsM~)?@}QJ7h0qV7?e_)qRE_`#sMd-55eh7jKS$bVO>g*ezDv=qLD*J}Jri zG|ps^(;5g0c}*vVqkbU-_f3Eug1%C|_c^7J#yVCCq>=4PU)*ci%J@~R_JArlc$mN) zaJE$OC<)nXDQfO`Yjx+$9IuIGTI<}B<|^)Q(6V-k=^k}jPIX5O->_PeSf+o1LbuD? z6}QsUGu~yakd_d*Okc8T9J^9)HrF~$Cm}Q?zH>@hu^U{y@RU7?XVwDLDqf>2%3$@& zpkp8ur)Xb@w`ijJ4kkQ&^D`>a(;T+K)bA0R6ANz{Vw@gMg|M_pF2DMoHz_rf0FyYi z4P7L~GLu&;X)zyoVJh2B2E)KxLU0~;)by?FqMA}4_`rC_SJF>@fwa{|8JbxC48ucG z!gyEY6Pcugb*uLFLZc4=UKP2-g{;Nm9OkOA{vhUgqdY5MCY|ELZ)yHYwVVGqSqzd* zFqEe4XW2kP|4ulfs#X5vn_^J32Xct~yos)kt#yXG7^e;3MIz;T5;fvoR`9V ztXK$^4QOvGI8lt`mue#2O-uF6kiMnr@l^0|Rj}aDBL?NU^f-%t?MtNqs8 zW;1Z3E^&lugO}F>=#t`@(Ow{c>xbxM!L+qU2(nb*SkPTq=|i_R3+u(nwqjnj&E$Gg zg_z^@5%n_|q?d_@qfE!v?`V1Yyo9o|R!z%Uy7IZOd?rD22Qrh-f}tivpN(cR=k(k& zFoI`!+K1*m>uHlI^=dJjU(|oAPT+nI5lI2Y2Li`R=;kLHfTZM>!Tw|JhVQOs&_&&} zx%8Ju|5(2E4{YB-bM=c>vxsa+j@|4CLli}q{#df~_9VOInC6M};dtdP2Jy$UJDj}z zDT!GX3_r39Y1FQsn~zQ%Dvt<6zOdaQ*qvd2m;3VW`3sckS=3dZXvZdsAJbR{YrH3tjBC<@IG)bid3Na z!PlK7U=zzb*2}ZiathuxgT6N1%<62?l1A&}v4zm#8o)Drna1stSBw_~pJ+I~wrO_Z z>wFx2fdns%6ccq{k1|4Y!Rg}mgBcOhcbkdaCZX@PZTaL5KD0?SlcFgQZAi(dapWr; z>{+Q#IQca$3}Y=Yt&JdN%~=%W`-&OO70$^r1=y!>N_r1bZIAs6#b{Bs0IR2@YPWyL>N7^sjZ;np(UiY2~n`bJ)X?;yrT zaDQGc?hvuSBW}_^^+`W-+7}D`;hK9&nCaIQ2}vpqjri4Jqv8ZxvR8DFBL9kw`R#yV zm3!*0dAx3RA~%`*$NN(_()`{SsC+ls@8E@KZGi|9?D?u4fx?ucF( z((gMol7h*kw{1l0-NNnZR~{YTC1W&W`Jag-@PvvM*ZTEkH@CuuO(i#&4*iP{VB13D ze?$Rx+p>=xRKT1!`gEfP95=zAYYB)1!kFvUhnsG|Rp>nt7Wb;h8R>=L^YPn@RRh{S zeo{cdIYgm^ESY>O&~sJgbY%9E<>zhA-WnUVr*tm^t|Y|5CT{_Iab=k>PUh^eF z70{^FhpeCdNO_A1lu+L>54PGYb(lB^)~`xy7$*g}T3o>km1=Tg(iMuVi-DV@B!ZCj>h zz4H(vKSdUlrE8svoEv!2lBp6eMuk+e1K8QF43`bUNqc$QNu(kV(5(q}1dX43nCD+NkC*TWg zmG9&}XG}%wHku+5VQN?^()3;7=4PeqP4|d$fp&H9@U1^W-rvf=Zn${WJ{k|RbAc`p zL%lD%tImeZ%NKUaa?>|#e@2mI1V~m$LOy@*6PtGH!gkI%%T6FToCbyC3B3cI#eUZ2 z-(Aeo|Hggu$Z}gDHzI_ttHs@M|iJM-WD7x96LANcD+1Cfmeiq3IrGu}ied<&b zB|3&`;@nI}-=9j#nM;e$+TL{B?gOR8zTzI0c}7^{QsR4j$H#?|SsxWRmyV*?)0N-t zk`+_J-uw*NFTK}CgYhE>c@ogoP~egF?last`qih_`XGvXJ2N4g%PUrQz0R^rxr_45 zH1rH*b3x1#y@)G3kI}D(&}# znL16iRR)~kKaq#w#3bqh>_mpVIAvC#i@M6_Zpc%&ZcGE~jGM!{KC`sgw-{_Vof`Y; zKle&H!nx#}}It2gP?JpxXf|*9Agk-$(dClS{5jmnDwM@K;6PRjg8Q%2=3V zcwk^?5Q_UYggO>z;Xwmx>x;EC=$Q$+@kT4Tg`3C#6%UlUbKg`Dq67Nu%Jbj;pi8*c zRZxWwt2+F_%_HH-Hjuso7yjD#R4{6uK1;gydqdP46l$k%48J@vT1O)+V{@cQ(yw7~ z+q_3qYeHe&VtICbJIapTJD!hGc+D)bL|x( z^c~0I9my!S1-;&zZf4@F$p&XK_^f}0;Y0lyegH$}OE}_>04+4L4VV)vu8vFfLEA&~ zS2Paj+q2VT&h4I##pD^alA-2e_et$@zjz*&9#P)6Ev=dcgm;}HdV4|9dr$OCENPwU zsXart-O+0%5q1|{Mj-ZvN0j%mpOZMzZOeXgBovydsR>(Bs~&rV{i&e%z^kz0R*w1%@$-|T zJ>_#Gb%l~0fYvX1-6ArXMd-S4-RsP^Z6gN$bX7gE(OV>^5M2lx48{44{y7=;}zI<4M zPA)7z__&Y2L&m51?BI&W#xM94Fz6h%PnLGhKd?TR0bpk3OUZ--419y3hc0C;RZQXC zR&JJ`?dxLB8wd=+N)N+5f(X5jB>wG{@%`)^|>mB`lQTP zz&EL55U@PR1CiaHppY9uDtJdxI&Xr%;IRjPhpMqgsJ)cxS^Hb zK8>3oOzY|St{Sg%D&y>uEW!E6^<2PoDc>s%0fYKMyL#^Rwt9IJ_BjcmJy4bo? z0{~L*u~|oGM&?nKYkG6c(^Up>|1f?^4bHff?K2n?k3Pcge6l*s^O;x}=}61A3pSD|z2 zE?+TU>Jk2N22$qyS{~qc^RDA6TM2LnmF;ZiwqP0x-7(U(H}W8~=bL@wuoZ=)dan_NA;A1R!$Y8IOI2BopPzYVW4c)*5c@pAqpf_4olXc} zoDeH-Azahyj8|9n{0`3tyh`E>6p=k*>S$P*V~d`y9Zwt|i|qEJ2S6~uKJ11&xUVT_ zr^)(^P#1mp6#m2Mr&~YB`TYH_)||KCdf0rz7_r3R{fBgZA%d5FCl|Z#_Wff{z;|i(%-Lg+F(rr3kB7?UX_IvaLNEpnBSVD`Q@nyntoLSY zX6xu)O!fs53HmQeYl=m8z}MCd(IMT150BX?T=^D-9?SHo*Q}C*Vs_iY>24mzGp4SX~_uby#tV8O8Q*JuB{8k zCldl2g?=ztD~Z&ksy~YLDrP3Dumabygip3bG*`_}roGtE z$M;KC_r%tA4Qi8;@62LefY+f%jKLg{8$wCb9DRgiPbp4z(xX^o7RY|JyRadq?BKGD z)vl*G{{7BqlCzhd^E2Q;b+!BiYgfCNP#S$Sq%Kl?c+NvwJyt6%ij`a&dyb!7!)ru~ zg-s8g`+=Tb>eg=|58(YYeu@0_NR<~cY1=XSeLBR~XZp;NW=`qg_Mm)Wh3o^N7ab+) z_(57g4HQWG>@48Nmyh@2UCg)pYaMXUu@0Q(7g*zmB{)(-`eCW9BC!Aux$O_$@qyUt94+1;P_8-121%A4CQiAQ69s;icwi z^UrqHvbcrv`(y~$p@Pzyy*{#Vtu=XO{V36Ezlf6FqUk8weR}2%6}pnfi*h(XZM@Tz zRHx}z82*LrD?2uTxh{@VAh?+G5uDpo*p`*wBbUM$&u&vbCWZ;gob{6-WKoFlR$~M| zo)CD#mnh7!hXmYC1?j`IJk9>9F&rl3R)TD!_k?$qT649=wA*O;ii9Y*!=)aw-E?-= z9{99K*3Ivw?Vy~G;)f2@Rv20#Fd?^{#M0L!oVBTwbd%`-#p94INnAF^N*YW z8uE{H?XPE24EZ|5-4bmRE3}gY#Kz9Z&t=Yr2=$RmnY3GYGjX1TY#&Cv18r8A?;qRZ z4>YMsLBEkPZ=sYJY}JIX@06%_%u4s_6S3c zChFWi_+pFtq2w<_OCR}1fAPRY-o)&=Wd{()Ol?s>)G9|xvIf!VzQHEy4!xB$NeJua zk!VxiirsJwd4|nO)Q1RoMbHoTMuwOwB0x2fvpq9YS*Dn_iM(E+J12q_bDNIpgZI9g zqeL$NUH1t;^CxAN=nb%bGinoPvTb=!KH-J;vFtf2`M@9mv4nnsla~<9C>o<%BntMN zv3@O)CE#^`y=cfj&+IlI0ZQQbsCnEe-AU$qQT)2I4G)Wf!I?KwXAI5`T2gkeyS(*8 zITowEalMNYki2)wICX2`Uo%$xByWidwet!G@RC@U;G<|J3u zI7mH^k?4eq;%-~RJ~f{a*MD9CWXNRfGTjt|Vk+up?`uog$e<`1T|+r^8}ra%1{KEw zq_firA;vqrutrffF?4;97s7;(XbctCVcei;siWH>Ardm|0*;w2>l%&HITa`t^pN!> zd0dPwpH?@JnE6M)X(sC6x2!2vE)AMsYhy@KmrP59_W0+W8ta|Ad!M*;e=V%t!sfS3 zaYX8DRT{iLi6+b5;aClp+Gwe4Yh`LUv_{@usnzN2d%&W_f$_ zR1qijV(l!@V7=?ubLw!ZFR0IBK&c3#VGQn!*g*Kpe5gAgB8LEpYE5k8)-jEJ2I*_n z9gI(bqyMv>jQq1(6Z8!X4LCN*WBQkJAQ&txEa=)>(C4262Xt!WYH4G_=wxbaYU$v@ z5oDvOv8g*b-}=neuYEAqW@3n{?46@N1mPwCmjLGW47hx~8auag|;-_&+k6o&sL z%{!U2BZF4<-+*@Ja=ah~!Td#n19Hw1Qva&Uzn;$_+^$UnND(cT5Dbj;1!o8DHz#Hm z9aK-i{8>^^s*5;(r2`9Wfy4S&0cgDny4ye%5{?LR1bmU$AntFXz#JvYADL%f4?=nY z9p}(NNzak|Mr6(r|5-e$&3;hKSCDHVsO^B(Y5zFV$$#T@>9B#w^H9HvNX&r?WS)lw zrM1HJ`<~J~#-C~NFH;KuKn5^33K$sKA1Q%>^)dg(=e)%KFuk&20@aiWJs23t3w$v5 zUw9a#7mp99zwoP;&Sih!PFq0zGy9i8(f&*?QvuX^g#X0847K$qwonO#B?D?NBK(Q} zJHiP_FP-I2I2f1~s4Q&%dQ$(y1Nh&j$@CuRZ^ryD!V5L_7dgNifCvO2adz}SOY~A$ z^iKl75+pN9_q*?5(jfnN2W-vq-+xQ~)2Dzs%fD(C$qEQq=J_+97fPfr5=*rKRypH> zgh^@t#QRo^c}jwVfysjU3F`~|J4c|u4*?Ly8ygfp=JzlIQWE_AIGsQ@=>JtCFZ2Xo zq@?Tu-1MdS7vY7B)C)qc7f^YX`OjkhE#?Gzpnnf@zd6y~AS^j>X!S)uc_B&jB5iKK zZ~RIa+P@0)Li*zci6H>!xF-5%fnMzTe}Rn-`JKV@8r`4xfA(sFfeF6Ai-!NkFDDTE zt3WUIroA9F#{DL(u9N(k$=}<5Kx59!OzMHZ@j{@{QaJP91J#R-7B4dDNdAlXZ_*2= z^%tbswBIC!eC&Vyq!+%?FG$nrzeylhX<+!~i{AXV$0_LD@$zR)XZ^(?{j(bW_Vokx z5VjY2^ydD?OK)NQiGSe%_5x2(@EaddLG-U5^1@x_1xcqEm|Okt=KjC)4gYXNKLa1S zXn^+HzlZJfAzWbW_OD?(s0*0B4SMVUvNnEoypmoZ! { description = "Validates an Open API 2.0 or 3.x specification document." inputSpec.set(validate.inputSpec) + recommend.set(validate.recommend) } create("openApiGenerate", GenerateTask::class.java) { diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt index cbf525bd7cba..72b9fb6bf2af 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt @@ -29,4 +29,18 @@ open class OpenApiGeneratorValidateExtension(project: Project) { * The input specification to validate. Supports all formats supported by the Parser. */ val inputSpec = project.objects.property() + + /** + * Whether or not to offer recommendations related to the validated specification document. + */ + val recommend = project.objects.property() + + init { + applyDefaults() + } + + @Suppress("MemberVisibilityCanBePrivate") + fun applyDefaults(){ + recommend.set(true) + } } \ No newline at end of file diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt index 6e5283163ba2..81e8d2ee9847 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt @@ -14,6 +14,8 @@ * limitations under the License. */ +@file:Suppress("UnstableApiUsage") + package org.openapitools.generator.gradle.plugin.tasks import io.swagger.parser.OpenAPIParser @@ -22,9 +24,12 @@ import org.gradle.api.GradleException import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.options.Option +import org.gradle.api.logging.Logging import org.gradle.internal.logging.text.StyledTextOutput import org.gradle.internal.logging.text.StyledTextOutputFactory import org.gradle.kotlin.dsl.property +import org.openapitools.codegen.validations.oas.OpenApiEvaluator +import org.openapitools.codegen.validations.oas.RuleConfiguration /** * A generator which validates an Open API spec. This task outputs a list of validation issues and errors. @@ -46,6 +51,9 @@ open class ValidateTask : DefaultTask() { @get:Internal var inputSpec = project.objects.property() + @get:Internal + var recommend = project.objects.property() + @Suppress("unused") @get:Internal @set:Option(option = "input", description = "The input specification.") @@ -57,13 +65,35 @@ open class ValidateTask : DefaultTask() { @Suppress("unused") @TaskAction fun doWork() { + val logger = Logging.getLogger(javaClass) + val spec = inputSpec.get() + val recommendations = recommend.get() + logger.quiet("Validating spec $spec") val result = OpenAPIParser().readLocation(spec, null, null) val messages = result.messages.toSet() val out = services.get(StyledTextOutputFactory::class.java).create("openapi") - if (messages.isNotEmpty()) { + + val ruleConfiguration = RuleConfiguration() + ruleConfiguration.isEnableRecommendations = recommendations + + val evaluator = OpenApiEvaluator(ruleConfiguration) + val validationResult = evaluator.validate(result.openAPI) + + if (validationResult.warnings.isNotEmpty()) { + out.withStyle(StyledTextOutput.Style.Info) + out.println("\nSpec has issues or recommendations.\nIssues:\n") + + validationResult.warnings.forEach { + out.withStyle(StyledTextOutput.Style.Info) + out.println("\t${it.message}\n") + logger.debug("WARNING: ${it.message}|${it.details}") + } + } + + if (messages.isNotEmpty() || validationResult.errors.isNotEmpty()) { out.withStyle(StyledTextOutput.Style.Error) out.println("\nSpec is invalid.\nIssues:\n") @@ -71,11 +101,19 @@ open class ValidateTask : DefaultTask() { messages.forEach { out.withStyle(StyledTextOutput.Style.Error) out.println("\t$it\n") + logger.debug("ERROR: $it") + } + + validationResult.errors.forEach { + out.withStyle(StyledTextOutput.Style.Error) + out.println("\t${it.message}\n") + logger.debug("ERROR: ${it.message}|${it.details}") } throw GradleException("Validation failed.") } else { out.withStyle(StyledTextOutput.Style.Success) + logger.debug("No error validations from swagger-parser or internal validations.") out.println("Spec is valid.") } } From 6f1ce5645ebf61b77ae0d6bc523b553f706d25c2 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sat, 1 Feb 2020 05:50:11 -0800 Subject: [PATCH 36/72] [codegen] Add code comments and improve "first content" warning (#5184) * Add code comments and improve warning --- .../openapitools/codegen/DefaultCodegen.java | 13 ++++++++- .../codegen/utils/ModelUtils.java | 27 ++++++++++++++++--- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 4ebed00b41b4..6d704fe95092 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 @@ -1593,9 +1593,13 @@ public String toDefaultValueWithParam(String name, Schema schema) { public String getSchemaType(Schema schema) { if (schema instanceof ComposedSchema) { // composed schema ComposedSchema cs = (ComposedSchema) schema; + // Get the interfaces, i.e. the set of elements under 'allOf', 'anyOf' or 'oneOf'. List schemas = ModelUtils.getInterfaces(cs); List names = new ArrayList<>(); + // Build a list of the schema types under each interface. + // For example, if a 'allOf' composed schema has $ref children, + // add the type of each child to the list of names. for (Schema s : schemas) { names.add(getSingleSchemaType(s)); } @@ -1637,7 +1641,8 @@ public String toAllOfName(List names, ComposedSchema composedSchema) { } else if (names.size() == 1) { return names.get(0); } else { - LOGGER.warn("allOf with multiple schemas defined. Using only the first one: {}. To fully utilize allOf, please use $ref instead of inline schema definition", names.get(0)); + LOGGER.warn("allOf with multiple schemas defined. Using only the first one: {}. " + + "To fully utilize allOf, please use $ref instead of inline schema definition", names.get(0)); return names.get(0); } } @@ -1670,6 +1675,12 @@ public String toOneOfName(List names, ComposedSchema composedSchema) { return "oneOf<" + String.join(",", names) + ">"; } + /** + * Return a string representation of the schema type, resolving aliasing and references if necessary. + * + * @param schema + * @return the string representation of the schema type. + */ private String getSingleSchemaType(Schema schema) { Schema unaliasSchema = ModelUtils.unaliasSchema(this.openAPI, schema); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index a539cddb1fd2..3872b11d8723 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -791,15 +791,36 @@ public static Schema getSchemaFromResponse(ApiResponse response) { return getSchemaFromContent(response.getContent()); } + /** + * Return the first Schema from a specified OAS 'content' section. + * + * For example, given the following OAS, this method returns the schema + * for the 'application/json' content type because it is listed first in the OAS. + * + * responses: + * '200': + * content: + * application/json: + * schema: + * $ref: '#/components/schemas/XYZ' + * application/xml: + * ... + * + * @param content a 'content' section in the OAS specification. + * @return the Schema. + */ private static Schema getSchemaFromContent(Content content) { if (content == null || content.isEmpty()) { return null; } + Map.Entry entry = content.entrySet().iterator().next(); if (content.size() > 1) { - LOGGER.warn("Multiple schemas found in content, returning only the first one"); + // Other content types are currently ignored by codegen. If you see this warning, + // reorder the OAS spec to put the desired content type first. + LOGGER.warn("Multiple schemas found in the OAS 'content' section, returning only the first one ({})", + entry.getKey()); } - MediaType mediaType = content.values().iterator().next(); - return mediaType.getSchema(); + return entry.getValue().getSchema(); } /** From 20e5c5d6e714218b9d8a8441163df198eb3bf24d Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sat, 1 Feb 2020 06:44:15 -0800 Subject: [PATCH 37/72] [Golang] Add support allOf inheritance with embedded go structs (#4934) * Golang: generate embedded structs and set supportsInheritance to true * Run bin/go-experimental-petstore.sh --- .../codegen/languages/AbstractGoCodegen.java | 29 +++++++ .../resources/go-experimental/model.mustache | 5 ++ .../src/main/resources/go/model.mustache | 4 +- .../src/main/resources/go/model_doc.mustache | 4 +- .../go-petstore/docs/BigCat.md | 78 ----------------- .../go-experimental/go-petstore/docs/Cat.md | 52 ------------ .../go-experimental/go-petstore/docs/Dog.md | 52 ------------ .../go-petstore/model_big_cat.go | 85 +------------------ .../go-experimental/go-petstore/model_cat.go | 51 +---------- .../go-experimental/go-petstore/model_dog.go | 51 +---------- .../go-experimental/go-petstore/docs/Cat.md | 52 ------------ .../go-experimental/go-petstore/docs/Dog.md | 52 ------------ .../go-experimental/go-petstore/model_cat.go | 51 +---------- .../go-experimental/go-petstore/model_dog.go | 51 +---------- 14 files changed, 43 insertions(+), 574 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 6b910f446763..24547880a797 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -51,6 +51,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege public AbstractGoCodegen() { super(); + supportsInheritance = true; hideGenerationTimestamp = Boolean.FALSE; defaultIncludes = new HashSet( @@ -332,6 +333,34 @@ public String getSchemaType(Schema p) { type = openAPIType; return type; } + + /** + * Determines the golang instantiation type of the specified schema. + * + * This function is called when the input schema is a map, and specifically + * when the 'additionalProperties' attribute is present in the OAS specification. + * Codegen invokes this function to resolve the "parent" association to + * 'additionalProperties'. + * + * Note the 'parent' attribute in the codegen model is used in the following scenarios: + * - Indicate a polymorphic association with some other type (e.g. class inheritance). + * - If the specification has a discriminator, cogegen create a “parent” based on the discriminator. + * - Use of the 'additionalProperties' attribute in the OAS specification. + * This is the specific scenario when codegen invokes this function. + * + * @param property the input schema + * + * @return the golang instantiation type of the specified property. + */ + @Override + public String toInstantiationType(Schema property) { + if (ModelUtils.isMapSchema(property)) { + return getTypeDeclaration(property); + } else if (ModelUtils.isArraySchema(property)) { + return getTypeDeclaration(property); + } + return super.toInstantiationType(property); + } @Override public String toOperationId(String operationId) { diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache index cbffd1fc340f..ac200f650a5a 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache @@ -29,6 +29,11 @@ const ( {{^isEnum}} // {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} type {{classname}} struct { +{{#parent}} +{{^isMapModel}} + {{{parent}}} +{{/isMapModel}} +{{/parent}} {{#vars}} {{^-first}} {{/-first}} diff --git a/modules/openapi-generator/src/main/resources/go/model.mustache b/modules/openapi-generator/src/main/resources/go/model.mustache index 201fd507ff93..f30047a9e216 100644 --- a/modules/openapi-generator/src/main/resources/go/model.mustache +++ b/modules/openapi-generator/src/main/resources/go/model.mustache @@ -29,14 +29,14 @@ const ( {{^isEnum}} // {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} type {{classname}} struct { -{{#vars}} +{{#allVars}} {{^-first}} {{/-first}} {{#description}} // {{{description}}} {{/description}} {{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` -{{/vars}} +{{/allVars}} } {{/isEnum}} {{/model}} diff --git a/modules/openapi-generator/src/main/resources/go/model_doc.mustache b/modules/openapi-generator/src/main/resources/go/model_doc.mustache index e96a7f53257b..ae517d4a75a3 100644 --- a/modules/openapi-generator/src/main/resources/go/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_doc.mustache @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} -{{/vars}} +{{#allVars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/allVars}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md b/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md index dd23b6193424..1f1f446d0273 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md @@ -4,88 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] -**Declawed** | Pointer to **bool** | | [optional] **Kind** | Pointer to **string** | | [optional] ## Methods -### GetClassName - -`func (o *BigCat) GetClassName() string` - -GetClassName returns the ClassName field if non-nil, zero value otherwise. - -### GetClassNameOk - -`func (o *BigCat) GetClassNameOk() (string, bool)` - -GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasClassName - -`func (o *BigCat) HasClassName() bool` - -HasClassName returns a boolean if a field has been set. - -### SetClassName - -`func (o *BigCat) SetClassName(v string)` - -SetClassName gets a reference to the given string and assigns it to the ClassName field. - -### GetColor - -`func (o *BigCat) GetColor() string` - -GetColor returns the Color field if non-nil, zero value otherwise. - -### GetColorOk - -`func (o *BigCat) GetColorOk() (string, bool)` - -GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasColor - -`func (o *BigCat) HasColor() bool` - -HasColor returns a boolean if a field has been set. - -### SetColor - -`func (o *BigCat) SetColor(v string)` - -SetColor gets a reference to the given string and assigns it to the Color field. - -### GetDeclawed - -`func (o *BigCat) GetDeclawed() bool` - -GetDeclawed returns the Declawed field if non-nil, zero value otherwise. - -### GetDeclawedOk - -`func (o *BigCat) GetDeclawedOk() (bool, bool)` - -GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasDeclawed - -`func (o *BigCat) HasDeclawed() bool` - -HasDeclawed returns a boolean if a field has been set. - -### SetDeclawed - -`func (o *BigCat) SetDeclawed(v bool)` - -SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. - ### GetKind `func (o *BigCat) GetKind() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md index 0f2fe5a1f1f8..c7ea3b3adfb2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -4,62 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] **Declawed** | Pointer to **bool** | | [optional] ## Methods -### GetClassName - -`func (o *Cat) GetClassName() string` - -GetClassName returns the ClassName field if non-nil, zero value otherwise. - -### GetClassNameOk - -`func (o *Cat) GetClassNameOk() (string, bool)` - -GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasClassName - -`func (o *Cat) HasClassName() bool` - -HasClassName returns a boolean if a field has been set. - -### SetClassName - -`func (o *Cat) SetClassName(v string)` - -SetClassName gets a reference to the given string and assigns it to the ClassName field. - -### GetColor - -`func (o *Cat) GetColor() string` - -GetColor returns the Color field if non-nil, zero value otherwise. - -### GetColorOk - -`func (o *Cat) GetColorOk() (string, bool)` - -GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasColor - -`func (o *Cat) HasColor() bool` - -HasColor returns a boolean if a field has been set. - -### SetColor - -`func (o *Cat) SetColor(v string)` - -SetColor gets a reference to the given string and assigns it to the Color field. - ### GetDeclawed `func (o *Cat) GetDeclawed() bool` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md index 4b5c332d8e14..ddc5be776dc4 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -4,62 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] **Breed** | Pointer to **string** | | [optional] ## Methods -### GetClassName - -`func (o *Dog) GetClassName() string` - -GetClassName returns the ClassName field if non-nil, zero value otherwise. - -### GetClassNameOk - -`func (o *Dog) GetClassNameOk() (string, bool)` - -GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasClassName - -`func (o *Dog) HasClassName() bool` - -HasClassName returns a boolean if a field has been set. - -### SetClassName - -`func (o *Dog) SetClassName(v string)` - -SetClassName gets a reference to the given string and assigns it to the ClassName field. - -### GetColor - -`func (o *Dog) GetColor() string` - -GetColor returns the Color field if non-nil, zero value otherwise. - -### GetColorOk - -`func (o *Dog) GetColorOk() (string, bool)` - -GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasColor - -`func (o *Dog) HasColor() bool` - -HasColor returns a boolean if a field has been set. - -### SetColor - -`func (o *Dog) SetColor(v string)` - -SetColor gets a reference to the given string and assigns it to the Color field. - ### GetBreed `func (o *Dog) GetBreed() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go index c9a0a1b69780..1960c5f32f6e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go @@ -16,93 +16,10 @@ import ( // BigCat struct for BigCat type BigCat struct { - ClassName string `json:"className"` - Color *string `json:"color,omitempty"` - Declawed *bool `json:"declawed,omitempty"` + Cat Kind *string `json:"kind,omitempty"` } -// GetClassName returns the ClassName field value -func (o *BigCat) GetClassName() string { - if o == nil { - var ret string - return ret - } - - return o.ClassName -} - -// SetClassName sets field value -func (o *BigCat) SetClassName(v string) { - o.ClassName = v -} - -// GetColor returns the Color field value if set, zero value otherwise. -func (o *BigCat) GetColor() string { - if o == nil || o.Color == nil { - var ret string - return ret - } - return *o.Color -} - -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *BigCat) GetColorOk() (string, bool) { - if o == nil || o.Color == nil { - var ret string - return ret, false - } - return *o.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (o *BigCat) HasColor() bool { - if o != nil && o.Color != nil { - return true - } - - return false -} - -// SetColor gets a reference to the given string and assigns it to the Color field. -func (o *BigCat) SetColor(v string) { - o.Color = &v -} - -// GetDeclawed returns the Declawed field value if set, zero value otherwise. -func (o *BigCat) GetDeclawed() bool { - if o == nil || o.Declawed == nil { - var ret bool - return ret - } - return *o.Declawed -} - -// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *BigCat) GetDeclawedOk() (bool, bool) { - if o == nil || o.Declawed == nil { - var ret bool - return ret, false - } - return *o.Declawed, true -} - -// HasDeclawed returns a boolean if a field has been set. -func (o *BigCat) HasDeclawed() bool { - if o != nil && o.Declawed != nil { - return true - } - - return false -} - -// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. -func (o *BigCat) SetDeclawed(v bool) { - o.Declawed = &v -} - // GetKind returns the Kind field value if set, zero value otherwise. func (o *BigCat) GetKind() string { if o == nil || o.Kind == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go index a9f83cc8c408..0303bc0826aa 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go @@ -16,59 +16,10 @@ import ( // Cat struct for Cat type Cat struct { - ClassName string `json:"className"` - Color *string `json:"color,omitempty"` + Animal Declawed *bool `json:"declawed,omitempty"` } -// GetClassName returns the ClassName field value -func (o *Cat) GetClassName() string { - if o == nil { - var ret string - return ret - } - - return o.ClassName -} - -// SetClassName sets field value -func (o *Cat) SetClassName(v string) { - o.ClassName = v -} - -// GetColor returns the Color field value if set, zero value otherwise. -func (o *Cat) GetColor() string { - if o == nil || o.Color == nil { - var ret string - return ret - } - return *o.Color -} - -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Cat) GetColorOk() (string, bool) { - if o == nil || o.Color == nil { - var ret string - return ret, false - } - return *o.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (o *Cat) HasColor() bool { - if o != nil && o.Color != nil { - return true - } - - return false -} - -// SetColor gets a reference to the given string and assigns it to the Color field. -func (o *Cat) SetColor(v string) { - o.Color = &v -} - // GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *Cat) GetDeclawed() bool { if o == nil || o.Declawed == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go index eb2d7f05d41a..176820573897 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go @@ -16,59 +16,10 @@ import ( // Dog struct for Dog type Dog struct { - ClassName string `json:"className"` - Color *string `json:"color,omitempty"` + Animal Breed *string `json:"breed,omitempty"` } -// GetClassName returns the ClassName field value -func (o *Dog) GetClassName() string { - if o == nil { - var ret string - return ret - } - - return o.ClassName -} - -// SetClassName sets field value -func (o *Dog) SetClassName(v string) { - o.ClassName = v -} - -// GetColor returns the Color field value if set, zero value otherwise. -func (o *Dog) GetColor() string { - if o == nil || o.Color == nil { - var ret string - return ret - } - return *o.Color -} - -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Dog) GetColorOk() (string, bool) { - if o == nil || o.Color == nil { - var ret string - return ret, false - } - return *o.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (o *Dog) HasColor() bool { - if o != nil && o.Color != nil { - return true - } - - return false -} - -// SetColor gets a reference to the given string and assigns it to the Color field. -func (o *Dog) SetColor(v string) { - o.Color = &v -} - // GetBreed returns the Breed field value if set, zero value otherwise. func (o *Dog) GetBreed() string { if o == nil || o.Breed == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md index 0f2fe5a1f1f8..c7ea3b3adfb2 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -4,62 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] **Declawed** | Pointer to **bool** | | [optional] ## Methods -### GetClassName - -`func (o *Cat) GetClassName() string` - -GetClassName returns the ClassName field if non-nil, zero value otherwise. - -### GetClassNameOk - -`func (o *Cat) GetClassNameOk() (string, bool)` - -GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasClassName - -`func (o *Cat) HasClassName() bool` - -HasClassName returns a boolean if a field has been set. - -### SetClassName - -`func (o *Cat) SetClassName(v string)` - -SetClassName gets a reference to the given string and assigns it to the ClassName field. - -### GetColor - -`func (o *Cat) GetColor() string` - -GetColor returns the Color field if non-nil, zero value otherwise. - -### GetColorOk - -`func (o *Cat) GetColorOk() (string, bool)` - -GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasColor - -`func (o *Cat) HasColor() bool` - -HasColor returns a boolean if a field has been set. - -### SetColor - -`func (o *Cat) SetColor(v string)` - -SetColor gets a reference to the given string and assigns it to the Color field. - ### GetDeclawed `func (o *Cat) GetDeclawed() bool` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md index 4b5c332d8e14..ddc5be776dc4 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -4,62 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] **Breed** | Pointer to **string** | | [optional] ## Methods -### GetClassName - -`func (o *Dog) GetClassName() string` - -GetClassName returns the ClassName field if non-nil, zero value otherwise. - -### GetClassNameOk - -`func (o *Dog) GetClassNameOk() (string, bool)` - -GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasClassName - -`func (o *Dog) HasClassName() bool` - -HasClassName returns a boolean if a field has been set. - -### SetClassName - -`func (o *Dog) SetClassName(v string)` - -SetClassName gets a reference to the given string and assigns it to the ClassName field. - -### GetColor - -`func (o *Dog) GetColor() string` - -GetColor returns the Color field if non-nil, zero value otherwise. - -### GetColorOk - -`func (o *Dog) GetColorOk() (string, bool)` - -GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasColor - -`func (o *Dog) HasColor() bool` - -HasColor returns a boolean if a field has been set. - -### SetColor - -`func (o *Dog) SetColor(v string)` - -SetColor gets a reference to the given string and assigns it to the Color field. - ### GetBreed `func (o *Dog) GetBreed() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go index a9f83cc8c408..0303bc0826aa 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go @@ -16,59 +16,10 @@ import ( // Cat struct for Cat type Cat struct { - ClassName string `json:"className"` - Color *string `json:"color,omitempty"` + Animal Declawed *bool `json:"declawed,omitempty"` } -// GetClassName returns the ClassName field value -func (o *Cat) GetClassName() string { - if o == nil { - var ret string - return ret - } - - return o.ClassName -} - -// SetClassName sets field value -func (o *Cat) SetClassName(v string) { - o.ClassName = v -} - -// GetColor returns the Color field value if set, zero value otherwise. -func (o *Cat) GetColor() string { - if o == nil || o.Color == nil { - var ret string - return ret - } - return *o.Color -} - -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Cat) GetColorOk() (string, bool) { - if o == nil || o.Color == nil { - var ret string - return ret, false - } - return *o.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (o *Cat) HasColor() bool { - if o != nil && o.Color != nil { - return true - } - - return false -} - -// SetColor gets a reference to the given string and assigns it to the Color field. -func (o *Cat) SetColor(v string) { - o.Color = &v -} - // GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *Cat) GetDeclawed() bool { if o == nil || o.Declawed == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go index eb2d7f05d41a..176820573897 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go @@ -16,59 +16,10 @@ import ( // Dog struct for Dog type Dog struct { - ClassName string `json:"className"` - Color *string `json:"color,omitempty"` + Animal Breed *string `json:"breed,omitempty"` } -// GetClassName returns the ClassName field value -func (o *Dog) GetClassName() string { - if o == nil { - var ret string - return ret - } - - return o.ClassName -} - -// SetClassName sets field value -func (o *Dog) SetClassName(v string) { - o.ClassName = v -} - -// GetColor returns the Color field value if set, zero value otherwise. -func (o *Dog) GetColor() string { - if o == nil || o.Color == nil { - var ret string - return ret - } - return *o.Color -} - -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Dog) GetColorOk() (string, bool) { - if o == nil || o.Color == nil { - var ret string - return ret, false - } - return *o.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (o *Dog) HasColor() bool { - if o != nil && o.Color != nil { - return true - } - - return false -} - -// SetColor gets a reference to the given string and assigns it to the Color field. -func (o *Dog) SetColor(v string) { - o.Color = &v -} - // GetBreed returns the Breed field value if set, zero value otherwise. func (o *Dog) GetBreed() string { if o == nil || o.Breed == nil { From e86faa4ed12744dd30290b5c63dc1a300baad7e7 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Sun, 2 Feb 2020 00:54:53 +0900 Subject: [PATCH 38/72] [csharp][csharp-netcore][csharp-dotnet2] Convert bool value to string in lower case (#5178) * Convert bool value to string in lower case * Update sample projects --- .../csharp-dotnet2/ApiClient.mustache | 2 ++ .../csharp-netcore/ClientUtils.mustache | 2 ++ .../main/resources/csharp/ApiClient.mustache | 2 ++ .../Org/OpenAPITools/Client/ApiClient.cs | 2 ++ .../Org.OpenAPITools/Client/ClientUtils.cs | 2 ++ .../Org.OpenAPITools/Client/ClientUtils.cs | 2 ++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../csharp/OpenAPIClientNet35/README.md | 2 +- .../csharp/OpenAPIClientNet35/docs/FakeApi.md | 8 +++---- .../src/Org.OpenAPITools/Api/FakeApi.cs | 12 +++++----- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../csharp/OpenAPIClientNet40/README.md | 2 +- .../csharp/OpenAPIClientNet40/docs/FakeApi.md | 8 +++---- .../src/Org.OpenAPITools/Api/FakeApi.cs | 12 +++++----- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../csharp/OpenAPIClientNetStandard/README.md | 2 +- .../OpenAPIClientNetStandard/docs/FakeApi.md | 8 +++---- .../src/Org.OpenAPITools/Api/FakeApi.cs | 24 +++++++++---------- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../README.md | 2 +- .../docs/FakeApi.md | 8 +++---- .../src/Org.OpenAPITools/Api/FakeApi.cs | 24 +++++++++---------- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ 23 files changed, 78 insertions(+), 56 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache index 4c8d13c5a998..c382839d8984 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache @@ -148,6 +148,8 @@ namespace {{clientPackage}} // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is List) return String.Join(",", (obj as List).ToArray()); else diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache index b569ade0d669..4528441a5ab8 100755 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache @@ -99,6 +99,8 @@ namespace {{packageName}}.Client // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else { if (obj is IList) diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache index 812ac789ae5b..1b6ee4fa8ade 100644 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache @@ -297,6 +297,8 @@ namespace {{packageName}}.Client // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is IList) { var flattenedString = new StringBuilder(); diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs index 095f97997ec3..934ae82628d4 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs @@ -148,6 +148,8 @@ public string ParameterToString(object obj) // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is List) return String.Join(",", (obj as List).ToArray()); else diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs index eb882784701d..dde50ca71de2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -104,6 +104,8 @@ public static string ParameterToString(object obj, IReadableConfiguration config // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else { if (obj is IList) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs index eb882784701d..dde50ca71de2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -104,6 +104,8 @@ public static string ParameterToString(object obj, IReadableConfiguration config // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else { if (obj is IList) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index 973dc3ec597b..4d536076615e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -254,6 +254,8 @@ public string ParameterToString(object obj) // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is IList) { var flattenedString = new StringBuilder(); diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md index 5f55053b6f59..2e2e37841c49 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md @@ -114,7 +114,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index a295fe0554f1..edffb58d3c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -616,9 +616,9 @@ No authorization required > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -658,7 +658,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs index 4064d18eb897..ec114cf37c7a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs @@ -195,10 +195,10 @@ public interface IFakeApi : IApiAccessor /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); ///

- /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -219,10 +219,10 @@ public interface IFakeApi : IApiAccessor void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1073,7 +1073,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1097,7 +1097,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs index 82cc839063be..0d0e5fad12f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs @@ -227,6 +227,8 @@ public string ParameterToString(object obj) // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is IList) { var flattenedString = new StringBuilder(); diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md index 5f55053b6f59..2e2e37841c49 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md @@ -114,7 +114,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index a295fe0554f1..edffb58d3c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -616,9 +616,9 @@ No authorization required > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -658,7 +658,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs index 7d8cf0e1ee6d..7da4d32ecbc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs @@ -195,10 +195,10 @@ public interface IFakeApi : IApiAccessor /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -219,10 +219,10 @@ public interface IFakeApi : IApiAccessor void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1073,7 +1073,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1097,7 +1097,7 @@ public ApiResponse TestClientModelWithHttpInfo (ModelClient body) } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs index 82cc839063be..0d0e5fad12f5 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs @@ -227,6 +227,8 @@ public string ParameterToString(object obj) // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is IList) { var flattenedString = new StringBuilder(); diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md index 87280d665a0b..19c69aa88d0b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md @@ -90,7 +90,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index a295fe0554f1..edffb58d3c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -616,9 +616,9 @@ No authorization required > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -658,7 +658,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs index 9eb33690b176..6195602de816 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs @@ -195,10 +195,10 @@ public interface IFakeApi : IApiAccessor /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -219,10 +219,10 @@ public interface IFakeApi : IApiAccessor void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -553,10 +553,10 @@ public interface IFakeApi : IApiAccessor /// Task of ApiResponse (ModelClient) System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -577,10 +577,10 @@ public interface IFakeApi : IApiAccessor System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2020,7 +2020,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2044,7 +2044,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2139,7 +2139,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2164,7 +2164,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs index 3d9c30ab1fcb..4b8e41dc2a13 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs @@ -259,6 +259,8 @@ public string ParameterToString(object obj) // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is IList) { var flattenedString = new StringBuilder(); diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md index 5f55053b6f59..2e2e37841c49 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md @@ -114,7 +114,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index a295fe0554f1..edffb58d3c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -616,9 +616,9 @@ No authorization required > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -658,7 +658,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs index bc14d5e90f57..8739ddfa49a1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs @@ -195,10 +195,10 @@ public interface IFakeApi : IApiAccessor /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -219,10 +219,10 @@ public interface IFakeApi : IApiAccessor void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -553,10 +553,10 @@ public interface IFakeApi : IApiAccessor /// Task of ApiResponse (ModelClient) System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -577,10 +577,10 @@ public interface IFakeApi : IApiAccessor System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2020,7 +2020,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2044,7 +2044,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2139,7 +2139,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2164,7 +2164,7 @@ public async System.Threading.Tasks.Task> TestClientMod } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs index 973dc3ec597b..4d536076615e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs @@ -254,6 +254,8 @@ public string ParameterToString(object obj) // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is bool) + return (bool)obj ? "true" : "false"; else if (obj is IList) { var flattenedString = new StringBuilder(); From a8435d153e71d405f881c8d430c406160d07289a Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Sun, 2 Feb 2020 01:08:09 +0900 Subject: [PATCH 39/72] [csharp-netcore] Remove unnecessary legacy project definitions (#5108) * Remove unnecessary csproj definitions * Removed deprecated files generation * Fixed code generator compile error * Update sample code * Update sample projects * Revert "Removed deprecated files generation" This reverts commit c6841c2b54fac74d31a1cf59ea73d50c430609ba. * Revert "Fixed code generator compile error" This reverts commit cc0bd070e75d9fbc9620045105631fef8ca6fc1b. * Regenerate missing project.json file --- .../Org.OpenAPITools.Test.csproj | 5 --- .../Org.OpenAPITools.Test.csproj | 5 --- .../resources/csharp-netcore/Project.mustache | 15 ++++---- .../csharp-netcore/TestProject.mustache | 19 ++++------- .../csharp-netcore/netcore_project.mustache | 27 +++------------ .../netcore_testproject.mustache | 34 ++----------------- .../Org.OpenAPITools.Test.csproj | 5 --- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 15 ++++---- .../Org.OpenAPITools.Test.csproj | 5 --- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 25 +++----------- .../src/Org.OpenAPITools/project.json | 12 ------- 11 files changed, 32 insertions(+), 135 deletions(-) delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/project.json diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 6155a4768496..4893f78082ae 100644 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -24,13 +24,8 @@ OpenAPI spec version: 1.0.0 - - - - - diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 6155a4768496..4893f78082ae 100644 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -24,13 +24,8 @@ OpenAPI spec version: 1.0.0 - - - - - diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache index c0f69d349b67..bc7ff4020320 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache @@ -34,15 +34,12 @@ {{releaseNote}}{{/releaseNote}}{{#packageTags}} {{{packageTags}}}{{/packageTags}} + - - - - - - - - - + + + + + diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache index a5d124698075..8be9bfd8620b 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache @@ -22,20 +22,15 @@ 512 - - - - - - - - + + + - - {{packageGuid}} - {{packageName}} - + + {{packageGuid}} + {{packageName}} + 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 ac52e613eb9a..0346837de672 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 @@ -11,9 +11,6 @@ {{packageTitle}} {{packageDescription}} {{packageCopyright}} - true - true - true {{packageName}} {{packageVersion}} bin\$(Configuration)\$(TargetFramework)\{{packageName}}.xml{{#licenseId}} @@ -25,25 +22,11 @@ - - - - - + + + + + - {{^netStandard}} - - - - - - - - - - - - {{/netStandard}} - 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 d6faf0b43f97..e75195ffea2b 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 @@ -2,45 +2,17 @@ {{testPackageName}} - {{testPackageName}} - Library - {{packageAuthors}} - {{packageCompany}} - {{packageTitle}} - {{packageDescription}} - {{packageCopyright}} - true - true - true {{testPackageName}} {{testTargetFramework}} false - - - - - - - + + + - {{^netStandard}} - - - - - - - - - - - - {{/netStandard}} - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 6155a4768496..4893f78082ae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -24,13 +24,8 @@ OpenAPI spec version: 1.0.0 - - - - - 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 f416158b5916..5402a1dc2337 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 @@ -28,15 +28,12 @@ The version of the OpenAPI document: 1.0.0 https://github.com/GIT_USER_ID/GIT_REPO_ID Minor update + - - - - - - - - - + + + + + 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 6155a4768496..4893f78082ae 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 @@ -24,13 +24,8 @@ OpenAPI spec version: 1.0.0 - - - - - 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 d30de15d9e15..13e44d29d9f3 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 @@ -11,9 +11,6 @@ OpenAPI Library A library generated from a OpenAPI doc No Copyright - true - true - true Org.OpenAPITools 1.0.0 bin\$(Configuration)\$(TargetFramework)\Org.OpenAPITools.xml @@ -23,23 +20,11 @@ - - - - - - - - - - - - - - - - - + + + + + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/project.json b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/project.json deleted file mode 100644 index 252f5b93e63a..000000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/project.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "supports": {}, - "dependencies": { - "Newtonsoft.Json": "12.0.1", - "CompareNETObjects": "4.57.0", - "JsonSubTypes": "1.5.2", - "RestSharp": "106.6.7" - }, - "frameworks": { - "netcoreapp2.0": {} - } -} From 8197a8a47bc9ca9d618c9b24460568d4c4ef3d87 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Sun, 2 Feb 2020 01:26:27 +0900 Subject: [PATCH 40/72] Explicitly set `netCoreProjectFile` only for .NET Core target (#5151) --- .../codegen/languages/CSharpNetCoreClientCodegen.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 f21f156e200c..779f2b66c5eb 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 @@ -569,7 +569,10 @@ public void processOpts() { setSupportsAsync(Boolean.TRUE); setNetStandard(strategy.isNetStandard); - setNetCoreProjectFileFlag(!strategy.isNetStandard); + + if (!strategy.isNetStandard) { + setNetCoreProjectFileFlag(true); + } if (additionalProperties.containsKey(CodegenConstants.GENERATE_PROPERTY_CHANGED)) { LOGGER.warn(CodegenConstants.GENERATE_PROPERTY_CHANGED + " is not supported in the .NET Standard generator."); From cd67822d68f46adc206908b246662705eced5ee0 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 2 Feb 2020 00:29:17 +0800 Subject: [PATCH 41/72] Add shibayan to C# technical committee (#5186) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86b1546febe3..75d9475a558a 100644 --- a/README.md +++ b/README.md @@ -907,7 +907,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) | | C | @zhemant (2018/11) @ityuhui (2019/12) | | C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) | -| C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) @frankyjuang (2019/09) | +| C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) @frankyjuang (2019/09) @shibayan (2020/02)| | Clojure | | | Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @nickmeinhold (2019/09) @athornz (2019/12) @amondnet (2019/12) | | Eiffel | @jvelilla (2017/09) | From 8d8c106c3a2675871b9d5d6fc7f35575779399f7 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sat, 1 Feb 2020 12:42:15 -0800 Subject: [PATCH 42/72] [Go] Support HTTP signature (#4959) * add support for ECDSA keys * Add support for HTTP signature * use bytes.Buffer instead of strings.Builder * Add unit tests, compliance with HTTP signature draft version 12 * Support (expires) parameter * Validate list of signed headers does not have duplicate values * move method to ProcessUtils * Add http-signature security scheme * add http_signature_test to security scheme * remove http signature from petapi * Add separate OAS file with support for HTTP signature * Include HTTP signature in README file * Add generated files for HTTP signature * Add helper function to return public key, and add more unit tests for signature validation * some people save their private key with file extensions other than .pem, so I am relaxing the validation of the private key suffix --- bin/openapi3/go-experimental-petstore.sh | 6 +- .../GoClientExperimentalCodegen.java | 12 + .../resources/go-experimental/README.mustache | 36 +- .../resources/go-experimental/client.mustache | 13 +- .../go-experimental/configuration.mustache | 3 + .../http_signature_test.mustache | 720 +++++++++++++++++ .../go-experimental/signing.mustache | 414 ++++++++++ .../go-experimental/go-petstore/client.go | 1 - .../go-petstore/configuration.go | 3 + .../go-experimental/go-petstore/README.md | 36 +- .../go-petstore/api/openapi.yaml | 7 + .../go-experimental/go-petstore/client.go | 11 +- .../go-petstore/configuration.go | 3 + .../go-petstore/docs/PetApi.md | 8 +- .../go-petstore/http_signature_test.go | 728 ++++++++++++++++++ .../go-experimental/go-petstore/signing.go | 422 ++++++++++ 16 files changed, 2406 insertions(+), 17 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/go-experimental/http_signature_test.mustache create mode 100644 modules/openapi-generator/src/main/resources/go-experimental/signing.mustache create mode 100644 samples/openapi3/client/petstore/go-experimental/go-petstore/http_signature_test.go create mode 100644 samples/openapi3/client/petstore/go-experimental/go-petstore/signing.go diff --git a/bin/openapi3/go-experimental-petstore.sh b/bin/openapi3/go-experimental-petstore.sh index 46c7841a2800..901c8c62dc4e 100755 --- a/bin/openapi3/go-experimental-petstore.sh +++ b/bin/openapi3/go-experimental-petstore.sh @@ -25,7 +25,11 @@ then mvn -B clean package fi -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" +#SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" +# petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml is the same as the above file, with +# the addition of the HTTP signature security scheme. Ideally, this would have been directly added to +# petstore-with-fake-endpoints-models-for-testing.yaml, but this cannot be done until issue #5025 is resolved. +SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml" GENERATOR="go-experimental" STUB_DIR="samples/openapi3/client/petstore/go-experimental/go-petstore" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index 5edabbefbd15..d7fa0c435a4b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -16,11 +16,14 @@ package org.openapitools.codegen.languages; +import io.swagger.v3.oas.models.security.SecurityScheme; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenSecurity; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,6 +70,15 @@ public String getHelp() { public void processOpts() { super.processOpts(); supportingFiles.add(new SupportingFile("utils.mustache", "", "utils.go")); + + // 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.mustache", "", "signing.go")); + supportingFiles.add(new SupportingFile("http_signature_test.mustache", "", "http_signature_test.go")); + } } @Override diff --git a/modules/openapi-generator/src/main/resources/go-experimental/README.mustache b/modules/openapi-generator/src/main/resources/go-experimental/README.mustache index ca2082dc8dc7..3f037b0be5a4 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/README.mustache @@ -104,7 +104,9 @@ Class | Method | HTTP request | Description Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{keyParamName}} and passed in as the auth context for each request. {{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication +{{#isBasic}} +{{#isBasicBasic}} +- **Type**: HTTP basic authentication Example @@ -116,6 +118,38 @@ auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAut r, err := client.Service.Operation(auth, args) ``` +{{/isBasicBasic}} +{{#isHttpSignature}} +- **Type**: HTTP signature authentication + +Example + +```golang + authConfig := sw.HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "rsa.pem", + Passphrase: "my-passphrase", + SigningScheme: sw.HttpSigningSchemeHs2019, + SignedHeaders: []string{ + sw.HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + sw.HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + SigningAlgorithm: sw.HttpSigningAlgorithmRsaPSS, + SignatureMaxValidity: 5 * time.Minute, + } + var authCtx context.Context + var err error + if authCtx, err = authConfig.ContextWithValue(context.Background()); err != nil { + // Process error + } + r, err = client.Service.Operation(auth, args) + +``` +{{/isHttpSignature}} {{/isBasic}} {{#isOAuth}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/client.mustache b/modules/openapi-generator/src/main/resources/go-experimental/client.mustache index 6678caedfb85..b4567ea9d9e3 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/client.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/client.mustache @@ -351,7 +351,18 @@ func (c *APIClient) prepareRequest( for header, value := range c.cfg.DefaultHeader { localVarRequest.Header.Add(header, value) } - +{{#hasHttpSignatureMethods}} + if ctx != nil { + // HTTP Signature Authentication. All request headers must be set (including default headers) + // because the headers may be included in the signature. + if auth, ok := ctx.Value(ContextHttpSignatureAuth).(HttpSignatureAuth); ok { + err = SignRequest(ctx, localVarRequest, auth) + if err != nil { + return nil, err + } + } + } +{{/hasHttpSignatureMethods}} return localVarRequest, nil } diff --git a/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache b/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache index d7b93eac06ab..3cda1954db89 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache @@ -31,6 +31,9 @@ var ( // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") diff --git a/modules/openapi-generator/src/main/resources/go-experimental/http_signature_test.mustache b/modules/openapi-generator/src/main/resources/go-experimental/http_signature_test.mustache new file mode 100644 index 000000000000..79202f6f4aff --- /dev/null +++ b/modules/openapi-generator/src/main/resources/go-experimental/http_signature_test.mustache @@ -0,0 +1,720 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "crypto" + "crypto/ecdsa" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/asn1" + "encoding/base64" + "encoding/pem" + "fmt" + "io/ioutil" + "math/big" + "net/http" + "net/http/httputil" + "os" + "path/filepath" + "regexp" + "strings" + "testing" + "time" +) + +// Test RSA private key as published in Appendix C 'Test Values' of +// https://www.ietf.org/id/draft-cavage-http-signatures-12.txt +const rsaTestPrivateKey string = `-----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-----` + +func writeTestRsaPemKey(t *testing.T, filePath string) { + err := ioutil.WriteFile(filePath, []byte(rsaTestPrivateKey), 0644) + if err != nil { + t.Fatalf("Error writing private key: %v", err) + } +} + +type keyFormat int // The serialization format of the private key. + +const ( + keyFormatPem keyFormat = iota // Private key is serialized in PEM format. + keyFormatPkcs8Pem // Private key is serialized as PKCS#8 encoded in PEM format. + keyFormatPkcs8Der // Private key is serialized as PKCS#8 encoded in DER format. +) + +func writeRandomTestRsaPemKey(t *testing.T, filePath string, bits int, format keyFormat, passphrase string, alg *x509.PEMCipher) { + key, err := rsa.GenerateKey(rand.Reader, bits) + if err != nil { + t.Fatalf("Error generating RSA private key file: %v", err) + } + var outFile *os.File + outFile, err = os.Create(filePath) + if err != nil { + t.Fatalf("Error creating RSA private key file: %v", err) + } + defer outFile.Close() + var privKeyBytes []byte + switch format { + case keyFormatPem: + if passphrase != "" { + t.Fatalf("Encrypting PKCS#1-encoded private key with passphrase is not supported") + } + privKeyBytes = x509.MarshalPKCS1PrivateKey(key) + case keyFormatPkcs8Pem: + privKeyBytes, err = x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatalf("Error writing private key: %v", err) + } + case keyFormatPkcs8Der: + if passphrase != "" { + t.Fatalf("Encrypting DER-encoded private key with passphrase is not supported") + } + privKeyBytes, err = x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatalf("Error writing private key: %v", err) + } + _, err = outFile.Write(privKeyBytes) + if err != nil { + t.Fatalf("Error writing DER-encoded private key: %v", err) + } + default: + t.Fatalf("Unsupported key format: %v", format) + } + + switch format { + case keyFormatPem, keyFormatPkcs8Der: + var pemBlock *pem.Block + if passphrase == "" { + pemBlock = &pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: privKeyBytes, + } + } else { + pemBlock, err = x509.EncryptPEMBlock(rand.Reader, "ENCRYPTED PRIVATE KEY", privKeyBytes, []byte(passphrase), *alg) + if err != nil { + t.Fatalf("Error encoding RSA private key: %v", err) + } + } + err = pem.Encode(outFile, pemBlock) + if err != nil { + t.Fatalf("Error encoding RSA private key: %v", err) + } + } + fmt.Printf("Wrote private key '%s'\n", filePath) +} + +/* +Commented out because OpenAPITools is configured to use golang 1.8 at build time +x509.MarshalPKCS8PrivateKey is not present. +func writeRandomTestEcdsaPemKey(t *testing.T, filePath string) { + key, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) + if err != nil { + t.Fatalf("Error generating ECDSA private key file: %v", err) + } + var outFile *os.File + outFile, err = os.Create(filePath) + if err != nil { + t.Fatalf("Error creating ECDSA private key file: %v", err) + } + defer outFile.Close() + + var keybytes []byte + keybytes, err = x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatalf("Error marshaling ECDSA private key: %v", err) + } + var privateKey = &pem.Block{ + Type: "PRIVATE KEY", + Bytes: keybytes, + } + + err = pem.Encode(outFile, privateKey) + if err != nil { + t.Fatalf("Error encoding ECDSA private key: %v", err) + } +} +*/ + +// TestHttpSignaturePrivateKeys creates private keys of various sizes, serialization format, +// clear-text and password encrypted. +// Test unmarshaling of the private key. +func TestHttpSignaturePrivateKeys(t *testing.T) { + var err error + var dir string + dir, err = ioutil.TempDir("", "go-http-sign") + if err != nil { + t.Fatalf("Failed to create temporary directory") + } + defer os.RemoveAll(dir) + + pemCiphers := []x509.PEMCipher{ + x509.PEMCipherDES, + x509.PEMCipher3DES, + x509.PEMCipherAES128, + x509.PEMCipherAES192, + x509.PEMCipherAES256, + } + // Test RSA private keys with various key lengths. + for _, bits := range []int{1024, 2048, 3072, 4096} { + + for _, format := range []keyFormat{keyFormatPem, keyFormatPkcs8Pem, keyFormatPkcs8Der} { + // Generate test private key. + var privateKeyPath string + switch format { + case keyFormatPem, keyFormatPkcs8Pem: + privateKeyPath = "privatekey.pem" + case keyFormatPkcs8Der: + privateKeyPath = "privatekey.der" + default: + t.Fatalf("Unsupported private key format: %v", format) + } + privateKeyPath = filepath.Join(dir, privateKeyPath) + // Generate keys in PEM format. + writeRandomTestRsaPemKey(t, privateKeyPath, bits, format, "", nil) + + authConfig := HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: privateKeyPath, + Passphrase: "", + SigningScheme: "hs2019", + SignedHeaders: []string{"Content-Type"}, + } + + // Create a context with the HTTP signature configuration parameters. + _, err = authConfig.ContextWithValue(context.Background()) + if err != nil { + t.Fatalf("Error loading private key '%s': %v", privateKeyPath, err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: privateKeyPath, + Passphrase: "my-secret-passphrase", + SigningScheme: "hs2019", + SignedHeaders: []string{"Content-Type"}, + } + switch format { + case keyFormatPem: + // Do nothing. Keys cannot be encrypted when using PKCS#1. + case keyFormatPkcs8Pem: + for _, alg := range pemCiphers { + writeRandomTestRsaPemKey(t, privateKeyPath, bits, format, authConfig.Passphrase, &alg) + _, err := authConfig.ContextWithValue(context.Background()) + if err != nil { + t.Fatalf("Error loading private key '%s': %v", privateKeyPath, err) + } + } + } + } + } + + /* + Unfortunately, currently the build environment for OpenAPITools is using an old version + of golang that does not support ECDSA keys. + { + privateKeyPath := "privatekey.pem" + authConfig := HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: "hs2019", + SignedHeaders: []string{"Content-Type"}, + } + // Generate test private key. + writeRandomTestEcdsaPemKey(t, privateKeyPath) + err := authConfig.LoadPrivateKey(privateKeyPath) + if err != nil { + t.Fatalf("Error loading private key '%s': %v", privateKeyPath, err) + } + } + */ +} + +const testHost = "petstore.swagger.io:80" +const testScheme = "http" + +func executeHttpSignatureAuth(t *testing.T, authConfig *HttpSignatureAuth, expectSuccess bool) string { + var err error + var dir string + dir, err = ioutil.TempDir("", "go-http-sign") + if err != nil { + t.Fatalf("Failed to create temporary directory") + } + defer os.RemoveAll(dir) + + cfg := NewConfiguration() + cfg.AddDefaultHeader("testheader", "testvalue") + cfg.AddDefaultHeader("Content-Type", "application/json") + cfg.Host = testHost + cfg.Scheme = testScheme + apiClient := NewAPIClient(cfg) + + privateKeyPath := filepath.Join(dir, "rsa.pem") + writeTestRsaPemKey(t, privateKeyPath) + authConfig.PrivateKeyPath = privateKeyPath + var authCtx context.Context + authCtx, err = authConfig.ContextWithValue(context.Background()) + if expectSuccess && err != nil { + t.Fatalf("Error validating HTTP signature configuration: %v", err) + } + if !expectSuccess && err != nil { + // Do not continue. Error is expected. + return "" + } + newPet := (Pet{Id: PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, + Status: PtrString("pending"), + Tags: &[]Tag{Tag{Id: PtrInt64(1), Name: 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) + + r, err2 := apiClient.PetApi.AddPet(authCtx).Pet(newPet).Execute() + if expectSuccess && err2 != nil { + t.Fatalf("Error while adding pet: %v", err2) + } + if !expectSuccess { + if err2 == nil { + t.Fatalf("Error was expected, but no error was generated") + } else { + // Do not continue. Error is expected. + return "" + } + } + if r.StatusCode != 200 { + t.Log(r) + } + + _, r, err = apiClient.PetApi.GetPetById(authCtx, 12992).Execute() + if expectSuccess && err != nil { + t.Fatalf("Error while deleting pet by id: %v", err) + } + + // The request should look like this: + // + // GET /v2/pet/12992 HTTP/1.1 + // Host: petstore.swagger.io:80 + // Accept: application/json + // Authorization: Signature keyId="my-key-id",algorithm="hs2019",created=1579033245,headers="(request-target) date host digest content-type",signature="RMJZjVVxzlH02wlxiQgUYDe4QxZaI5IJNIfB2BK8Dhbv3WQ2gw0xyqC+5HiKUmT/cfchhhkUNNsUtiVRnjZmFwtSfYxHfiQvH3KWXlLCMwKGNQC3YzD9lnoWdx0pA5Kxbr0/ygmr3+lTyuN2PJg4IS7Ji/AaKAqIZx7RsHS8Bxw=" + // Date: Tue, 14 Jan 2020 06:41:22 GMT + // Digest: SHA-512=z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg== + // Testheader: testvalue + // User-Agent: OpenAPI-Generator/1.0.0/go + reqb, _ := httputil.DumpRequest(r.Request, true) + reqt := (string)(reqb) + fmt.Printf("REQUEST:\n%v\n", reqt) + var sb bytes.Buffer + fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, + authConfig.KeyId, authConfig.SigningScheme) + if len(authConfig.SignedHeaders) == 0 { + fmt.Fprintf(&sb, `created=[0-9]+,`) + } else { + for _, header := range authConfig.SignedHeaders { + header = strings.ToLower(header) + if header == HttpSignatureParameterCreated { + fmt.Fprintf(&sb, `created=[0-9]+,`) + } + if header == HttpSignatureParameterExpires { + fmt.Fprintf(&sb, `expires=[0-9]+\.[0-9]{3},`) + } + } + } + fmt.Fprintf(&sb, `headers="`) + for i, header := range authConfig.SignedHeaders { + header = strings.ToLower(header) + if i > 0 { + fmt.Fprintf(&sb, " ") + } + fmt.Fprintf(&sb, regexp.QuoteMeta(header)) + switch header { + case "date": + if !strings.Contains(reqt, "Date: ") { + t.Errorf("Date header is incorrect") + } + case "digest": + var prefix string + switch authConfig.SigningScheme { + case HttpSigningSchemeRsaSha256: + prefix = "SHA-256=" + default: + prefix = "SHA-512=" + } + if !strings.Contains(reqt, fmt.Sprintf("Digest: %s", prefix)) { + t.Errorf("Digest header is incorrect") + } + } + } + if len(authConfig.SignedHeaders) == 0 { + fmt.Fprintf(&sb, regexp.QuoteMeta(HttpSignatureParameterCreated)) + } + fmt.Fprintf(&sb, `",signature="[a-zA-Z0-9+/]+="`) + re := regexp.MustCompile(sb.String()) + actual := r.Request.Header.Get("Authorization") + if !re.MatchString(actual) { + t.Errorf("Authorization header is incorrect. Expected regex\n'%s'\nbut got\n'%s'", sb.String(), actual) + } + + validateHttpAuthorizationSignature(t, authConfig, r) + return r.Request.Header.Get("Authorization") +} + +var ( + // signatureRe is a regular expression to capture the fields from the signature. + signatureRe = regexp.MustCompile( + `Signature keyId="(?P[^"]+)",algorithm="(?P[^"]+)"` + + `(,created=(?P[0-9]+))?(,expires=(?P[0-9.]+))?,headers="(?P[^"]+)",signature="(?P[^"]+)"`) +) + +// validateHttpAuthorizationSignature validates the HTTP signature in the HTTP request. +// The signature verification would normally be done by the server. +// Note: this is NOT a complete implementation of the HTTP signature validation. This code is for unit test purpose, do not use +// it for server side implementation. +// In particular, this code does not validate the calculation of the HTTP body digest. +func validateHttpAuthorizationSignature(t *testing.T, authConfig *HttpSignatureAuth, r *http.Response) { + authHeader := r.Request.Header.Get("Authorization") + match := signatureRe.FindStringSubmatch(authHeader) + if len(match) < 3 { + t.Fatalf("Unexpected Authorization header: %s", authHeader) + } + result := make(map[string]string) + for i, name := range signatureRe.SubexpNames() { + if i != 0 && name != "" { + result[name] = match[i] + } + } + b64signature := result["signature"] + fmt.Printf("Algorithm: '%s' Headers: '%s' b64signature: '%s'\n", result["algorithm"], result["headers"], b64signature) + var sb bytes.Buffer + fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Request.Method), r.Request.URL.EscapedPath()) + if r.Request.URL.RawQuery != "" { + // The ":path" pseudo-header field includes the path and query parts + // of the target URI (the "path-absolute" production and optionally a + // '?' character followed by the "query" production (see Sections 3.3 + // and 3.4 of [RFC3986] + fmt.Fprintf(&sb, "?%s", r.Request.URL.RawQuery) + } + requestTarget := sb.String() + + var signedHeaderKvs []string + signedHeaders := strings.Split(result["headers"], " ") + for _, h := range signedHeaders { + var value string + switch h { + case HttpSignatureParameterRequestTarget: + value = requestTarget + case HttpSignatureParameterCreated: + value = result["created"] + case HttpSignatureParameterExpires: + value = result["expires"] + default: + value = r.Request.Header.Get(h) + } + signedHeaderKvs = append(signedHeaderKvs, fmt.Sprintf("%s: %s", h, value)) + } + stringToSign := strings.Join(signedHeaderKvs, "\n") + + var h crypto.Hash + switch result["algorithm"] { + case HttpSigningSchemeHs2019, HttpSigningSchemeRsaSha512: + h = crypto.SHA512 + case HttpSigningSchemeRsaSha256: + h = crypto.SHA256 + default: + t.Fatalf("Unexpected signing algorithm: %s", result["algorithm"]) + } + msgHash := h.New() + if _, err := msgHash.Write([]byte(stringToSign)); err != nil { + t.Fatalf("Unable to compute hash: %v", err) + } + d := msgHash.Sum(nil) + var pub crypto.PublicKey + var err error + if pub, err = authConfig.GetPublicKey(); err != nil { + t.Fatalf("Unable to get public key: %v", err) + } + if pub == nil { + t.Fatalf("Public key is nil") + } + var signature []byte + if signature, err = base64.StdEncoding.DecodeString(b64signature); err != nil { + t.Fatalf("Failed to decode signature: %v", err) + } + switch publicKey := pub.(type) { + case *rsa.PublicKey: + // It could be PKCS1v15 or PSS signature + var errPKCS1v15, errPSS error + // In a server-side implementation, we wouldn't try to validate both signatures. The specific + // signature algorithm would be derived from the key id. But here we just want to validate for unit test purpose. + errPKCS1v15 = rsa.VerifyPKCS1v15(publicKey, h, d, signature) + errPSS = rsa.VerifyPSS(publicKey, h, d, signature, nil) + if errPKCS1v15 != nil && errPSS != nil { + t.Fatalf("RSA Signature verification failed: %v. %v", errPKCS1v15, errPSS) + } + case *ecdsa.PublicKey: + type ecdsaSignature struct { + R, S *big.Int + } + var lEcdsa ecdsaSignature + if _, err = asn1.Unmarshal(signature, &lEcdsa); err != nil { + t.Fatalf("Unable to parse ECDSA signature: %v", err) + } + if !ecdsa.Verify(publicKey, d, lEcdsa.R, lEcdsa.S) { + t.Fatalf("ECDSA Signature verification failed") + } + default: + t.Fatalf("Unsupported public key: %T", pub) + } +} + +func TestHttpSignatureAuth(t *testing.T) { + // Test with 'hs2019' signature scheme, and default signature algorithm (RSA SSA PKCS1.5) + authConfig := HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with duplicate headers. This is invalid and should be rejected. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"Host", "Date", "Host"}, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Test with non-existent header. This is invalid and should be rejected. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"Host", "Date", "Garbage-HeaderDoesNotExist"}, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Test with 'Authorization' header in the signed headers. This is invalid and should be rejected. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"Host", "Authorization"}, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Specify signature max validity, but '(expires)' parameter is missing. This should cause an error. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignatureMaxValidity: 7 * time.Minute, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Specify invalid signature max validity. This should cause an error. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignatureMaxValidity: -3 * time.Minute, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Specify signature max validity and '(expires)' parameter. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignatureMaxValidity: time.Minute, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + HttpSignatureParameterExpires, // Time when signature expires. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Specify '(expires)' parameter but no signature max validity. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + HttpSignatureParameterExpires, // Time when signature expires. + }, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Test with empty signed headers. The client should automatically add the "(created)" parameter by default. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{}, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with deprecated RSA-SHA512, some servers may still support it. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeRsaSha512, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with deprecated RSA-SHA256, some servers may still support it. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeRsaSha256, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with headers without date. This makes it possible to get a fixed signature, used for unit test purpose. + // This should not be used in production code as it could potentially allow replay attacks. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SigningAlgorithm: HttpSigningAlgorithmRsaPKCS1v15, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + authorizationHeaderValue := executeHttpSignatureAuth(t, &authConfig, true) + expectedSignature := "sXE2MDeW8os6ywv1oUWaFEPFcSPCEb/msQ/NZGKNA9Emm/e42axaAPojzfkZ9Hacyw/iS/5nH4YIkczMgXu3z5fAwFjumxtf3OxbqvUcQ80wvw2/7B5aQmsF6ZwrCFHZ+L/cj9/bg7L1EGUGtdyDzoRKti4zf9QF/03OsP7QljI=" + expectedAuthorizationHeader := fmt.Sprintf( + `Signature keyId="my-key-id",`+ + `algorithm="hs2019",headers="(request-target) host content-type digest",`+ + `signature="%s"`, expectedSignature) + if authorizationHeaderValue != expectedAuthorizationHeader { + t.Errorf("Authorization header value is incorrect. Got\n'%s'\nbut expected\n'%s'", authorizationHeaderValue, expectedAuthorizationHeader) + } + + // Test with PSS signature. The PSS signature creates a new signature every time it is invoked. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SigningAlgorithm: HttpSigningAlgorithmRsaPSS, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + authorizationHeaderValue = executeHttpSignatureAuth(t, &authConfig, true) + expectedSignature = `[a-zA-Z0-9+/]+=` + expectedAuthorizationHeader = fmt.Sprintf( + `Signature keyId="my-key-id",`+ + `algorithm="hs2019",headers="\(request-target\) host content-type digest",`+ + `signature="%s"`, expectedSignature) + re := regexp.MustCompile(expectedAuthorizationHeader) + if !re.MatchString(authorizationHeaderValue) { + t.Errorf("Authorization header value is incorrect. Got\n'%s'\nbut expected\n'%s'", authorizationHeaderValue, expectedAuthorizationHeader) + } +} + +func TestInvalidHttpSignatureConfiguration(t *testing.T) { + var err error + var authConfig HttpSignatureAuth + + authConfig = HttpSignatureAuth{ + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Key ID must be specified") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Private key path must be specified") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Invalid signing scheme") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: "garbage", + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Invalid signing scheme") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"foo", "bar", "foo"}, + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "cannot have duplicate names") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"foo", "bar", "Authorization"}, + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Signed headers cannot include the 'Authorization' header") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"foo", "bar"}, + SignatureMaxValidity: -7 * time.Minute, + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Signature max validity must be a positive value") { + t.Fatalf("Invalid configuration: %v", err) + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/go-experimental/signing.mustache b/modules/openapi-generator/src/main/resources/go-experimental/signing.mustache new file mode 100644 index 000000000000..0dbfd0e5fa44 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/go-experimental/signing.mustache @@ -0,0 +1,414 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "crypto" + "crypto/ecdsa" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/textproto" + "os" + "strings" + "time" +) + +const ( + // Constants for HTTP signature parameters. + // The '(request-target)' parameter concatenates the lowercased :method, an + // ASCII space, and the :path pseudo-headers. + HttpSignatureParameterRequestTarget string = "(request-target)" + // The '(created)' parameter expresses when the signature was + // created. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterCreated string = "(created)" + // The '(expires)' parameter expresses when the signature ceases to + // be valid. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterExpires string = "(expires)" +) + +const ( + // Constants for HTTP headers. + // The 'Host' header, as defined in RFC 2616, section 14.23. + HttpHeaderHost string = "Host" + // The 'Date' header. + HttpHeaderDate string = "Date" + // The digest header, as defined in RFC 3230, section 4.3.2. + HttpHeaderDigest string = "Digest" + // The HTTP Authorization header, as defined in RFC 7235, section 4.2. + HttpHeaderAuthorization string = "Authorization" +) + +const ( + // Specifies the Digital Signature Algorithm is derived from metadata + // associated with 'keyId'. Supported DSA algorithms are RSASSA-PKCS1-v1_5, + // RSASSA-PSS, and ECDSA. + // The hash is SHA-512. + // This is the default value. + HttpSigningSchemeHs2019 string = "hs2019" + // Use RSASSA-PKCS1-v1_5 with SHA-512 hash. Deprecated. + HttpSigningSchemeRsaSha512 string = "rsa-sha512" + // Use RSASSA-PKCS1-v1_5 with SHA-256 hash. Deprecated. + HttpSigningSchemeRsaSha256 string = "rsa-sha256" + + // RFC 8017 section 7.2 + // Calculate the message signature using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5. + // PKCSV1_5 is deterministic. The same message and key will produce an identical + // signature value each time. + HttpSigningAlgorithmRsaPKCS1v15 string = "RSASSA-PKCS1-v1_5" + // Calculate the message signature using probabilistic signature scheme RSASSA-PSS. + // PSS is randomized and will produce a different signature value each time. + HttpSigningAlgorithmRsaPSS string = "RSASSA-PSS" +) + +var supportedSigningSchemes = map[string]bool{ + HttpSigningSchemeHs2019: true, + HttpSigningSchemeRsaSha512: true, + HttpSigningSchemeRsaSha256: true, +} + + +// HttpSignatureAuth provides HTTP signature authentication to a request passed +// via context using ContextHttpSignatureAuth. +// 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 which is available to the client. +// +// SignedHeaders specifies the list of HTTP headers that are included when generating +// the message signature. +// 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. +// +// For example, SignedHeaders can be set to: +// (request-target) (created) date host digest +// +// When SignedHeaders 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. +type HttpSignatureAuth struct { + KeyId string // A key identifier. + PrivateKeyPath string // The path to the private key. + Passphrase string // The passphrase to decrypt the private key, if the key is encrypted. + SigningScheme string // The signature scheme, when signing HTTP requests. Supported value is 'hs2019'. + // The signature algorithm, when signing HTTP requests. + // Supported values are RSASSA-PKCS1-v1_5, RSASSA-PSS. + SigningAlgorithm string + SignedHeaders []string // A list of HTTP headers included when generating the signature for the message. + // SignatureMaxValidity specifies the maximum duration of the signature validity. + // The value is used to set the '(expires)' signature parameter in the HTTP request. + // '(expires)' is set to '(created)' plus the value of the SignatureMaxValidity field. + // To specify the '(expires)' signature parameter, set 'SignatureMaxValidity' and add '(expires)' to 'SignedHeaders'. + SignatureMaxValidity time.Duration + privateKey crypto.PrivateKey // The private key used to sign HTTP requests. +} + +// ContextWithValue validates the HttpSignatureAuth configuration parameters and returns a context +// suitable for HTTP signature. An error is returned if the HttpSignatureAuth configuration parameters +// are invalid. +func (h *HttpSignatureAuth) ContextWithValue(ctx context.Context) (context.Context, error) { + if h.KeyId == "" { + return nil, fmt.Errorf("Key ID must be specified") + } + if h.PrivateKeyPath == "" { + return nil, fmt.Errorf("Private key path must be specified") + } + if _, ok := supportedSigningSchemes[h.SigningScheme]; !ok { + return nil, fmt.Errorf("Invalid signing scheme: '%v'", h.SigningScheme) + } + m := make(map[string]bool) + for _, h := range h.SignedHeaders { + if strings.ToLower(h) == strings.ToLower(HttpHeaderAuthorization) { + return nil, fmt.Errorf("Signed headers cannot include the 'Authorization' header") + } + m[h] = true + } + if len(m) != len(h.SignedHeaders) { + return nil, fmt.Errorf("List of signed headers cannot have duplicate names") + } + if h.SignatureMaxValidity < 0 { + return nil, fmt.Errorf("Signature max validity must be a positive value") + } + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + return context.WithValue(ctx, ContextHttpSignatureAuth, *h), nil +} + +// GetPublicKey returns the public key associated with this HTTP signature configuration. +func (h *HttpSignatureAuth) GetPublicKey() (crypto.PublicKey, error) { + if h.privateKey == nil { + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + } + switch key := h.privateKey.(type) { + case *rsa.PrivateKey: + return key.Public(), nil + case *ecdsa.PrivateKey: + return key.Public(), nil + default: + // Do not change '%T' to anything else such as '%v'! + // The value of the private key must not be returned. + return nil, fmt.Errorf("Unsupported key: %T", h.privateKey) + } +} + +// loadPrivateKey reads the private key from the file specified in the HttpSignatureAuth. +func (h *HttpSignatureAuth) loadPrivateKey() (err error) { + var file *os.File + file, err = os.Open(h.PrivateKeyPath) + if err != nil { + return fmt.Errorf("Cannot load private key '%s'. Error: %v", h.PrivateKeyPath, err) + } + defer func() { + err = file.Close() + }() + var priv []byte + priv, err = ioutil.ReadAll(file) + if err != nil { + return err + } + pemBlock, _ := pem.Decode(priv) + if pemBlock == nil { + // No PEM data has been found. + return fmt.Errorf("File '%s' does not contain PEM data", h.PrivateKeyPath) + } + var privKey []byte + if x509.IsEncryptedPEMBlock(pemBlock) { + // The PEM data is encrypted. + privKey, err = x509.DecryptPEMBlock(pemBlock, []byte(h.Passphrase)) + if err != nil { + // Failed to decrypt PEM block. Because of deficiencies in the encrypted-PEM format, + // it's not always possibleto detect an incorrect password. + return err + } + } else { + privKey = pemBlock.Bytes + } + switch pemBlock.Type { + case "RSA PRIVATE KEY": + if h.privateKey, err = x509.ParsePKCS1PrivateKey(privKey); err != nil { + return err + } + case "EC PRIVATE KEY", "PRIVATE KEY": + // https://tools.ietf.org/html/rfc5915 section 4. + if h.privateKey, err = x509.ParsePKCS8PrivateKey(privKey); err != nil { + return err + } + default: + return fmt.Errorf("Key '%s' is not supported", pemBlock.Type) + } + return nil +} + +// SignRequest signs the request using HTTP signature. +// See https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ +// +// Do not add, remove or change headers that are included in the SignedHeaders +// after SignRequest has been invoked; this is because the header values are +// included in the signature. Any subsequent alteration will cause a signature +// verification failure. +// If there are multiple instances of the same header field, all +// header field values associated with the header field MUST be +// concatenated, separated by a ASCII comma and an ASCII space +// ', ', and used in the order in which they will appear in the +// transmitted HTTP message. +func SignRequest( + ctx context.Context, + r *http.Request, + auth HttpSignatureAuth) error { + + if auth.privateKey == nil { + return fmt.Errorf("Private key is not set") + } + now := time.Now() + date := now.UTC().Format(http.TimeFormat) + // The 'created' field expresses when the signature was created. + // The value MUST be a Unix timestamp integer value. See 'HTTP signature' section 2.1.4. + created := now.Unix() + + var h crypto.Hash + var err error + var prefix string + var expiresUnix float64 + + if auth.SignatureMaxValidity < 0 { + return fmt.Errorf("Signature validity must be a positive value") + } + if auth.SignatureMaxValidity > 0 { + e := now.Add(auth.SignatureMaxValidity) + expiresUnix = float64(e.Unix()) + float64(e.Nanosecond()) / float64(time.Second) + } + // Determine the cryptographic hash to be used for the signature and the body digest. + switch auth.SigningScheme { + case HttpSigningSchemeRsaSha512, HttpSigningSchemeHs2019: + h = crypto.SHA512 + prefix = "SHA-512=" + case HttpSigningSchemeRsaSha256: + // This is deprecated and should no longer be used. + h = crypto.SHA256 + prefix = "SHA-256=" + default: + return fmt.Errorf("Unsupported signature scheme: %v", auth.SigningScheme) + } + if !h.Available() { + return fmt.Errorf("Hash '%v' is not available", h) + } + + // Build the "(request-target)" signature header. + var sb bytes.Buffer + fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Method), r.URL.EscapedPath()) + if r.URL.RawQuery != "" { + // The ":path" pseudo-header field includes the path and query parts + // of the target URI (the "path-absolute" production and optionally a + // '?' character followed by the "query" production (see Sections 3.3 + // and 3.4 of [RFC3986] + fmt.Fprintf(&sb, "?%s", r.URL.RawQuery) + } + requestTarget := sb.String() + sb.Reset() + + // Build the string to be signed. + signedHeaders := auth.SignedHeaders + if len(signedHeaders) == 0 { + signedHeaders = []string{HttpSignatureParameterCreated} + } + // Validate the list of signed headers has no duplicates. + m := make(map[string]bool) + for _, h := range signedHeaders { + m[h] = true + } + if len(m) != len(signedHeaders) { + return fmt.Errorf("List of signed headers must not have any duplicates") + } + hasCreatedParameter := false + hasExpiresParameter := false + for i, header := range signedHeaders { + header = strings.ToLower(header) + var value string + switch header { + case strings.ToLower(HttpHeaderAuthorization): + return fmt.Errorf("Cannot include the 'Authorization' header as a signed header.") + case HttpSignatureParameterRequestTarget: + value = requestTarget + case HttpSignatureParameterCreated: + value = fmt.Sprintf("%d", created) + hasCreatedParameter = true + case HttpSignatureParameterExpires: + if auth.SignatureMaxValidity.Nanoseconds() == 0 { + return fmt.Errorf("Cannot set '(expires)' signature parameter. SignatureMaxValidity is not configured.") + } + value = fmt.Sprintf("%.3f", expiresUnix) + hasExpiresParameter = true + case "date": + value = date + r.Header.Set(HttpHeaderDate, date) + case "digest": + // Calculate the digest of the HTTP request body. + // Calculate body digest per RFC 3230 section 4.3.2 + bodyHash := h.New() + if r.Body != nil { + // Make a copy of the body io.Reader so that we can read the body to calculate the hash, + // then one more time when marshaling the request. + var body io.Reader + body, err = r.GetBody() + if err != nil { + return err + } + if _, err = io.Copy(bodyHash, body); err != nil { + return err + } + } + d := bodyHash.Sum(nil) + value = prefix + base64.StdEncoding.EncodeToString(d) + r.Header.Set(HttpHeaderDigest, value) + case "host": + value = r.Host + r.Header.Set(HttpHeaderHost, r.Host) + default: + var ok bool + var v []string + canonicalHeader := textproto.CanonicalMIMEHeaderKey(header) + if v, ok = r.Header[canonicalHeader]; !ok { + // If a header specified in the headers parameter cannot be matched with + // a provided header in the message, the implementation MUST produce an error. + return fmt.Errorf("Header '%s' does not exist in the request", canonicalHeader) + } + // If there are multiple instances of the same header field, all + // header field values associated with the header field MUST be + // concatenated, separated by a ASCII comma and an ASCII space + // `, `, and used in the order in which they will appear in the + // transmitted HTTP message. + value = strings.Join(v, ", ") + } + if i > 0 { + fmt.Fprintf(&sb, "\n") + } + fmt.Fprintf(&sb, "%s: %s", header, value) + } + if expiresUnix != 0 && !hasExpiresParameter { + return fmt.Errorf("SignatureMaxValidity is specified, but '(expired)' parameter is not present") + } + msg := []byte(sb.String()) + msgHash := h.New() + if _, err = msgHash.Write(msg); err != nil { + return err + } + d := msgHash.Sum(nil) + + var signature []byte + switch key := auth.privateKey.(type) { + case *rsa.PrivateKey: + switch auth.SigningAlgorithm { + case HttpSigningAlgorithmRsaPKCS1v15: + signature, err = rsa.SignPKCS1v15(rand.Reader, key, h, d) + case "", HttpSigningAlgorithmRsaPSS: + signature, err = rsa.SignPSS(rand.Reader, key, h, d, nil) + default: + return fmt.Errorf("Unsupported signing algorithm: '%s'", auth.SigningAlgorithm) + } + case *ecdsa.PrivateKey: + signature, err = key.Sign(rand.Reader, d, h) + //case ed25519.PrivateKey: requires go 1.13 + // signature, err = key.Sign(rand.Reader, msg, crypto.Hash(0)) + default: + return fmt.Errorf("Unsupported private key") + } + if err != nil { + return err + } + + sb.Reset() + for i, header := range signedHeaders { + if i > 0 { + sb.WriteRune(' ') + } + sb.WriteString(strings.ToLower(header)) + } + headers_list := sb.String() + sb.Reset() + fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, auth.KeyId, auth.SigningScheme) + if hasCreatedParameter { + fmt.Fprintf(&sb, "created=%d,", created) + } + if hasExpiresParameter { + fmt.Fprintf(&sb, "expires=%.3f,", expiresUnix) + } + fmt.Fprintf(&sb, `headers="%s",signature="%s"`, headers_list, base64.StdEncoding.EncodeToString(signature)) + authStr := sb.String() + r.Header.Set(HttpHeaderAuthorization, authStr) + return nil +} diff --git a/samples/client/petstore/go-experimental/go-petstore/client.go b/samples/client/petstore/go-experimental/go-petstore/client.go index 4c4ecf168f41..2f97c129ab15 100644 --- a/samples/client/petstore/go-experimental/go-petstore/client.go +++ b/samples/client/petstore/go-experimental/go-petstore/client.go @@ -362,7 +362,6 @@ func (c *APIClient) prepareRequest( for header, value := range c.cfg.DefaultHeader { localVarRequest.Header.Add(header, value) } - return localVarRequest, nil } diff --git a/samples/client/petstore/go-experimental/go-petstore/configuration.go b/samples/client/petstore/go-experimental/go-petstore/configuration.go index 153d3a46ef3a..4c503f92637b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/configuration.go +++ b/samples/client/petstore/go-experimental/go-petstore/configuration.go @@ -39,6 +39,9 @@ var ( // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md index 9c0050a23522..a7fa78304046 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/README.md @@ -189,6 +189,9 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i ### bearer_test + +### http_basic_test + - **Type**: HTTP basic authentication Example @@ -202,20 +205,37 @@ r, err := client.Service.Operation(auth, args) ``` -### http_basic_test +### http_signature_test -- **Type**: HTTP basic authentication +- **Type**: HTTP signature authentication Example ```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` + authConfig := sw.HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "rsa.pem", + Passphrase: "my-passphrase", + SigningScheme: sw.HttpSigningSchemeHs2019, + SignedHeaders: []string{ + sw.HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + sw.HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + SigningAlgorithm: sw.HttpSigningAlgorithmRsaPSS, + SignatureMaxValidity: 5 * time.Minute, + } + var authCtx context.Context + var err error + if authCtx, err = authConfig.ContextWithValue(context.Background()); err != nil { + // Process error + } + r, err = client.Service.Operation(auth, args) +``` ### petstore_auth diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 71d688ccea20..177b761d6b6b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -57,6 +57,7 @@ paths: "405": description: Invalid input security: + - http_signature_test: [] - petstore_auth: - write:pets - read:pets @@ -75,6 +76,7 @@ paths: "405": description: Validation exception security: + - http_signature_test: [] - petstore_auth: - write:pets - read:pets @@ -121,6 +123,7 @@ paths: "400": description: Invalid status value security: + - http_signature_test: [] - petstore_auth: - write:pets - read:pets @@ -161,6 +164,7 @@ paths: "400": description: Invalid tag value security: + - http_signature_test: [] - petstore_auth: - write:pets - read:pets @@ -2057,3 +2061,6 @@ components: bearerFormat: JWT scheme: bearer type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go index 01ee73b79ec9..9da20522a22e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go @@ -365,7 +365,16 @@ func (c *APIClient) prepareRequest( for header, value := range c.cfg.DefaultHeader { localVarRequest.Header.Add(header, value) } - + if ctx != nil { + // HTTP Signature Authentication. All request headers must be set (including default headers) + // because the headers may be included in the signature. + if auth, ok := ctx.Value(ContextHttpSignatureAuth).(HttpSignatureAuth); ok { + err = SignRequest(ctx, localVarRequest, auth) + if err != nil { + return nil, err + } + } + } return localVarRequest, nil } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go index a6bbfbeff964..ddcea71eaf9a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go @@ -39,6 +39,9 @@ var ( // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md index a3c4f9457760..f88a802be249 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -41,7 +41,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -122,7 +122,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -161,7 +161,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -241,7 +241,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/http_signature_test.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/http_signature_test.go new file mode 100644 index 000000000000..f5f08b2ae6ef --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/http_signature_test.go @@ -0,0 +1,728 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstore + +import ( + "bytes" + "context" + "crypto" + "crypto/ecdsa" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/asn1" + "encoding/base64" + "encoding/pem" + "fmt" + "io/ioutil" + "math/big" + "net/http" + "net/http/httputil" + "os" + "path/filepath" + "regexp" + "strings" + "testing" + "time" +) + +// Test RSA private key as published in Appendix C 'Test Values' of +// https://www.ietf.org/id/draft-cavage-http-signatures-12.txt +const rsaTestPrivateKey string = `-----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-----` + +func writeTestRsaPemKey(t *testing.T, filePath string) { + err := ioutil.WriteFile(filePath, []byte(rsaTestPrivateKey), 0644) + if err != nil { + t.Fatalf("Error writing private key: %v", err) + } +} + +type keyFormat int // The serialization format of the private key. + +const ( + keyFormatPem keyFormat = iota // Private key is serialized in PEM format. + keyFormatPkcs8Pem // Private key is serialized as PKCS#8 encoded in PEM format. + keyFormatPkcs8Der // Private key is serialized as PKCS#8 encoded in DER format. +) + +func writeRandomTestRsaPemKey(t *testing.T, filePath string, bits int, format keyFormat, passphrase string, alg *x509.PEMCipher) { + key, err := rsa.GenerateKey(rand.Reader, bits) + if err != nil { + t.Fatalf("Error generating RSA private key file: %v", err) + } + var outFile *os.File + outFile, err = os.Create(filePath) + if err != nil { + t.Fatalf("Error creating RSA private key file: %v", err) + } + defer outFile.Close() + var privKeyBytes []byte + switch format { + case keyFormatPem: + if passphrase != "" { + t.Fatalf("Encrypting PKCS#1-encoded private key with passphrase is not supported") + } + privKeyBytes = x509.MarshalPKCS1PrivateKey(key) + case keyFormatPkcs8Pem: + privKeyBytes, err = x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatalf("Error writing private key: %v", err) + } + case keyFormatPkcs8Der: + if passphrase != "" { + t.Fatalf("Encrypting DER-encoded private key with passphrase is not supported") + } + privKeyBytes, err = x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatalf("Error writing private key: %v", err) + } + _, err = outFile.Write(privKeyBytes) + if err != nil { + t.Fatalf("Error writing DER-encoded private key: %v", err) + } + default: + t.Fatalf("Unsupported key format: %v", format) + } + + switch format { + case keyFormatPem, keyFormatPkcs8Der: + var pemBlock *pem.Block + if passphrase == "" { + pemBlock = &pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: privKeyBytes, + } + } else { + pemBlock, err = x509.EncryptPEMBlock(rand.Reader, "ENCRYPTED PRIVATE KEY", privKeyBytes, []byte(passphrase), *alg) + if err != nil { + t.Fatalf("Error encoding RSA private key: %v", err) + } + } + err = pem.Encode(outFile, pemBlock) + if err != nil { + t.Fatalf("Error encoding RSA private key: %v", err) + } + } + fmt.Printf("Wrote private key '%s'\n", filePath) +} + +/* +Commented out because OpenAPITools is configured to use golang 1.8 at build time +x509.MarshalPKCS8PrivateKey is not present. +func writeRandomTestEcdsaPemKey(t *testing.T, filePath string) { + key, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) + if err != nil { + t.Fatalf("Error generating ECDSA private key file: %v", err) + } + var outFile *os.File + outFile, err = os.Create(filePath) + if err != nil { + t.Fatalf("Error creating ECDSA private key file: %v", err) + } + defer outFile.Close() + + var keybytes []byte + keybytes, err = x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatalf("Error marshaling ECDSA private key: %v", err) + } + var privateKey = &pem.Block{ + Type: "PRIVATE KEY", + Bytes: keybytes, + } + + err = pem.Encode(outFile, privateKey) + if err != nil { + t.Fatalf("Error encoding ECDSA private key: %v", err) + } +} +*/ + +// TestHttpSignaturePrivateKeys creates private keys of various sizes, serialization format, +// clear-text and password encrypted. +// Test unmarshaling of the private key. +func TestHttpSignaturePrivateKeys(t *testing.T) { + var err error + var dir string + dir, err = ioutil.TempDir("", "go-http-sign") + if err != nil { + t.Fatalf("Failed to create temporary directory") + } + defer os.RemoveAll(dir) + + pemCiphers := []x509.PEMCipher{ + x509.PEMCipherDES, + x509.PEMCipher3DES, + x509.PEMCipherAES128, + x509.PEMCipherAES192, + x509.PEMCipherAES256, + } + // Test RSA private keys with various key lengths. + for _, bits := range []int{1024, 2048, 3072, 4096} { + + for _, format := range []keyFormat{keyFormatPem, keyFormatPkcs8Pem, keyFormatPkcs8Der} { + // Generate test private key. + var privateKeyPath string + switch format { + case keyFormatPem, keyFormatPkcs8Pem: + privateKeyPath = "privatekey.pem" + case keyFormatPkcs8Der: + privateKeyPath = "privatekey.der" + default: + t.Fatalf("Unsupported private key format: %v", format) + } + privateKeyPath = filepath.Join(dir, privateKeyPath) + // Generate keys in PEM format. + writeRandomTestRsaPemKey(t, privateKeyPath, bits, format, "", nil) + + authConfig := HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: privateKeyPath, + Passphrase: "", + SigningScheme: "hs2019", + SignedHeaders: []string{"Content-Type"}, + } + + // Create a context with the HTTP signature configuration parameters. + _, err = authConfig.ContextWithValue(context.Background()) + if err != nil { + t.Fatalf("Error loading private key '%s': %v", privateKeyPath, err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: privateKeyPath, + Passphrase: "my-secret-passphrase", + SigningScheme: "hs2019", + SignedHeaders: []string{"Content-Type"}, + } + switch format { + case keyFormatPem: + // Do nothing. Keys cannot be encrypted when using PKCS#1. + case keyFormatPkcs8Pem: + for _, alg := range pemCiphers { + writeRandomTestRsaPemKey(t, privateKeyPath, bits, format, authConfig.Passphrase, &alg) + _, err := authConfig.ContextWithValue(context.Background()) + if err != nil { + t.Fatalf("Error loading private key '%s': %v", privateKeyPath, err) + } + } + } + } + } + + /* + Unfortunately, currently the build environment for OpenAPITools is using an old version + of golang that does not support ECDSA keys. + { + privateKeyPath := "privatekey.pem" + authConfig := HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: "hs2019", + SignedHeaders: []string{"Content-Type"}, + } + // Generate test private key. + writeRandomTestEcdsaPemKey(t, privateKeyPath) + err := authConfig.LoadPrivateKey(privateKeyPath) + if err != nil { + t.Fatalf("Error loading private key '%s': %v", privateKeyPath, err) + } + } + */ +} + +const testHost = "petstore.swagger.io:80" +const testScheme = "http" + +func executeHttpSignatureAuth(t *testing.T, authConfig *HttpSignatureAuth, expectSuccess bool) string { + var err error + var dir string + dir, err = ioutil.TempDir("", "go-http-sign") + if err != nil { + t.Fatalf("Failed to create temporary directory") + } + defer os.RemoveAll(dir) + + cfg := NewConfiguration() + cfg.AddDefaultHeader("testheader", "testvalue") + cfg.AddDefaultHeader("Content-Type", "application/json") + cfg.Host = testHost + cfg.Scheme = testScheme + apiClient := NewAPIClient(cfg) + + privateKeyPath := filepath.Join(dir, "rsa.pem") + writeTestRsaPemKey(t, privateKeyPath) + authConfig.PrivateKeyPath = privateKeyPath + var authCtx context.Context + authCtx, err = authConfig.ContextWithValue(context.Background()) + if expectSuccess && err != nil { + t.Fatalf("Error validating HTTP signature configuration: %v", err) + } + if !expectSuccess && err != nil { + // Do not continue. Error is expected. + return "" + } + newPet := (Pet{Id: PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, + Status: PtrString("pending"), + Tags: &[]Tag{Tag{Id: PtrInt64(1), Name: 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) + + r, err2 := apiClient.PetApi.AddPet(authCtx).Pet(newPet).Execute() + if expectSuccess && err2 != nil { + t.Fatalf("Error while adding pet: %v", err2) + } + if !expectSuccess { + if err2 == nil { + t.Fatalf("Error was expected, but no error was generated") + } else { + // Do not continue. Error is expected. + return "" + } + } + if r.StatusCode != 200 { + t.Log(r) + } + + _, r, err = apiClient.PetApi.GetPetById(authCtx, 12992).Execute() + if expectSuccess && err != nil { + t.Fatalf("Error while deleting pet by id: %v", err) + } + + // The request should look like this: + // + // GET /v2/pet/12992 HTTP/1.1 + // Host: petstore.swagger.io:80 + // Accept: application/json + // Authorization: Signature keyId="my-key-id",algorithm="hs2019",created=1579033245,headers="(request-target) date host digest content-type",signature="RMJZjVVxzlH02wlxiQgUYDe4QxZaI5IJNIfB2BK8Dhbv3WQ2gw0xyqC+5HiKUmT/cfchhhkUNNsUtiVRnjZmFwtSfYxHfiQvH3KWXlLCMwKGNQC3YzD9lnoWdx0pA5Kxbr0/ygmr3+lTyuN2PJg4IS7Ji/AaKAqIZx7RsHS8Bxw=" + // Date: Tue, 14 Jan 2020 06:41:22 GMT + // Digest: SHA-512=z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg== + // Testheader: testvalue + // User-Agent: OpenAPI-Generator/1.0.0/go + reqb, _ := httputil.DumpRequest(r.Request, true) + reqt := (string)(reqb) + fmt.Printf("REQUEST:\n%v\n", reqt) + var sb bytes.Buffer + fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, + authConfig.KeyId, authConfig.SigningScheme) + if len(authConfig.SignedHeaders) == 0 { + fmt.Fprintf(&sb, `created=[0-9]+,`) + } else { + for _, header := range authConfig.SignedHeaders { + header = strings.ToLower(header) + if header == HttpSignatureParameterCreated { + fmt.Fprintf(&sb, `created=[0-9]+,`) + } + if header == HttpSignatureParameterExpires { + fmt.Fprintf(&sb, `expires=[0-9]+\.[0-9]{3},`) + } + } + } + fmt.Fprintf(&sb, `headers="`) + for i, header := range authConfig.SignedHeaders { + header = strings.ToLower(header) + if i > 0 { + fmt.Fprintf(&sb, " ") + } + fmt.Fprintf(&sb, regexp.QuoteMeta(header)) + switch header { + case "date": + if !strings.Contains(reqt, "Date: ") { + t.Errorf("Date header is incorrect") + } + case "digest": + var prefix string + switch authConfig.SigningScheme { + case HttpSigningSchemeRsaSha256: + prefix = "SHA-256=" + default: + prefix = "SHA-512=" + } + if !strings.Contains(reqt, fmt.Sprintf("Digest: %s", prefix)) { + t.Errorf("Digest header is incorrect") + } + } + } + if len(authConfig.SignedHeaders) == 0 { + fmt.Fprintf(&sb, regexp.QuoteMeta(HttpSignatureParameterCreated)) + } + fmt.Fprintf(&sb, `",signature="[a-zA-Z0-9+/]+="`) + re := regexp.MustCompile(sb.String()) + actual := r.Request.Header.Get("Authorization") + if !re.MatchString(actual) { + t.Errorf("Authorization header is incorrect. Expected regex\n'%s'\nbut got\n'%s'", sb.String(), actual) + } + + validateHttpAuthorizationSignature(t, authConfig, r) + return r.Request.Header.Get("Authorization") +} + +var ( + // signatureRe is a regular expression to capture the fields from the signature. + signatureRe = regexp.MustCompile( + `Signature keyId="(?P[^"]+)",algorithm="(?P[^"]+)"` + + `(,created=(?P[0-9]+))?(,expires=(?P[0-9.]+))?,headers="(?P[^"]+)",signature="(?P[^"]+)"`) +) + +// validateHttpAuthorizationSignature validates the HTTP signature in the HTTP request. +// The signature verification would normally be done by the server. +// Note: this is NOT a complete implementation of the HTTP signature validation. This code is for unit test purpose, do not use +// it for server side implementation. +// In particular, this code does not validate the calculation of the HTTP body digest. +func validateHttpAuthorizationSignature(t *testing.T, authConfig *HttpSignatureAuth, r *http.Response) { + authHeader := r.Request.Header.Get("Authorization") + match := signatureRe.FindStringSubmatch(authHeader) + if len(match) < 3 { + t.Fatalf("Unexpected Authorization header: %s", authHeader) + } + result := make(map[string]string) + for i, name := range signatureRe.SubexpNames() { + if i != 0 && name != "" { + result[name] = match[i] + } + } + b64signature := result["signature"] + fmt.Printf("Algorithm: '%s' Headers: '%s' b64signature: '%s'\n", result["algorithm"], result["headers"], b64signature) + var sb bytes.Buffer + fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Request.Method), r.Request.URL.EscapedPath()) + if r.Request.URL.RawQuery != "" { + // The ":path" pseudo-header field includes the path and query parts + // of the target URI (the "path-absolute" production and optionally a + // '?' character followed by the "query" production (see Sections 3.3 + // and 3.4 of [RFC3986] + fmt.Fprintf(&sb, "?%s", r.Request.URL.RawQuery) + } + requestTarget := sb.String() + + var signedHeaderKvs []string + signedHeaders := strings.Split(result["headers"], " ") + for _, h := range signedHeaders { + var value string + switch h { + case HttpSignatureParameterRequestTarget: + value = requestTarget + case HttpSignatureParameterCreated: + value = result["created"] + case HttpSignatureParameterExpires: + value = result["expires"] + default: + value = r.Request.Header.Get(h) + } + signedHeaderKvs = append(signedHeaderKvs, fmt.Sprintf("%s: %s", h, value)) + } + stringToSign := strings.Join(signedHeaderKvs, "\n") + + var h crypto.Hash + switch result["algorithm"] { + case HttpSigningSchemeHs2019, HttpSigningSchemeRsaSha512: + h = crypto.SHA512 + case HttpSigningSchemeRsaSha256: + h = crypto.SHA256 + default: + t.Fatalf("Unexpected signing algorithm: %s", result["algorithm"]) + } + msgHash := h.New() + if _, err := msgHash.Write([]byte(stringToSign)); err != nil { + t.Fatalf("Unable to compute hash: %v", err) + } + d := msgHash.Sum(nil) + var pub crypto.PublicKey + var err error + if pub, err = authConfig.GetPublicKey(); err != nil { + t.Fatalf("Unable to get public key: %v", err) + } + if pub == nil { + t.Fatalf("Public key is nil") + } + var signature []byte + if signature, err = base64.StdEncoding.DecodeString(b64signature); err != nil { + t.Fatalf("Failed to decode signature: %v", err) + } + switch publicKey := pub.(type) { + case *rsa.PublicKey: + // It could be PKCS1v15 or PSS signature + var errPKCS1v15, errPSS error + // In a server-side implementation, we wouldn't try to validate both signatures. The specific + // signature algorithm would be derived from the key id. But here we just want to validate for unit test purpose. + errPKCS1v15 = rsa.VerifyPKCS1v15(publicKey, h, d, signature) + errPSS = rsa.VerifyPSS(publicKey, h, d, signature, nil) + if errPKCS1v15 != nil && errPSS != nil { + t.Fatalf("RSA Signature verification failed: %v. %v", errPKCS1v15, errPSS) + } + case *ecdsa.PublicKey: + type ecdsaSignature struct { + R, S *big.Int + } + var lEcdsa ecdsaSignature + if _, err = asn1.Unmarshal(signature, &lEcdsa); err != nil { + t.Fatalf("Unable to parse ECDSA signature: %v", err) + } + if !ecdsa.Verify(publicKey, d, lEcdsa.R, lEcdsa.S) { + t.Fatalf("ECDSA Signature verification failed") + } + default: + t.Fatalf("Unsupported public key: %T", pub) + } +} + +func TestHttpSignatureAuth(t *testing.T) { + // Test with 'hs2019' signature scheme, and default signature algorithm (RSA SSA PKCS1.5) + authConfig := HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with duplicate headers. This is invalid and should be rejected. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"Host", "Date", "Host"}, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Test with non-existent header. This is invalid and should be rejected. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"Host", "Date", "Garbage-HeaderDoesNotExist"}, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Test with 'Authorization' header in the signed headers. This is invalid and should be rejected. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"Host", "Authorization"}, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Specify signature max validity, but '(expires)' parameter is missing. This should cause an error. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignatureMaxValidity: 7 * time.Minute, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Specify invalid signature max validity. This should cause an error. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignatureMaxValidity: -3 * time.Minute, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Specify signature max validity and '(expires)' parameter. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignatureMaxValidity: time.Minute, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + HttpSignatureParameterExpires, // Time when signature expires. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Specify '(expires)' parameter but no signature max validity. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + HttpSignatureParameterExpires, // Time when signature expires. + }, + } + executeHttpSignatureAuth(t, &authConfig, false) + + // Test with empty signed headers. The client should automatically add the "(created)" parameter by default. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{}, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with deprecated RSA-SHA512, some servers may still support it. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeRsaSha512, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with deprecated RSA-SHA256, some servers may still support it. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeRsaSha256, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + executeHttpSignatureAuth(t, &authConfig, true) + + // Test with headers without date. This makes it possible to get a fixed signature, used for unit test purpose. + // This should not be used in production code as it could potentially allow replay attacks. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SigningAlgorithm: HttpSigningAlgorithmRsaPKCS1v15, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + authorizationHeaderValue := executeHttpSignatureAuth(t, &authConfig, true) + expectedSignature := "sXE2MDeW8os6ywv1oUWaFEPFcSPCEb/msQ/NZGKNA9Emm/e42axaAPojzfkZ9Hacyw/iS/5nH4YIkczMgXu3z5fAwFjumxtf3OxbqvUcQ80wvw2/7B5aQmsF6ZwrCFHZ+L/cj9/bg7L1EGUGtdyDzoRKti4zf9QF/03OsP7QljI=" + expectedAuthorizationHeader := fmt.Sprintf( + `Signature keyId="my-key-id",`+ + `algorithm="hs2019",headers="(request-target) host content-type digest",`+ + `signature="%s"`, expectedSignature) + if authorizationHeaderValue != expectedAuthorizationHeader { + t.Errorf("Authorization header value is incorrect. Got\n'%s'\nbut expected\n'%s'", authorizationHeaderValue, expectedAuthorizationHeader) + } + + // Test with PSS signature. The PSS signature creates a new signature every time it is invoked. + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + SigningScheme: HttpSigningSchemeHs2019, + SigningAlgorithm: HttpSigningAlgorithmRsaPSS, + SignedHeaders: []string{ + HttpSignatureParameterRequestTarget, + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + } + authorizationHeaderValue = executeHttpSignatureAuth(t, &authConfig, true) + expectedSignature = `[a-zA-Z0-9+/]+=` + expectedAuthorizationHeader = fmt.Sprintf( + `Signature keyId="my-key-id",`+ + `algorithm="hs2019",headers="\(request-target\) host content-type digest",`+ + `signature="%s"`, expectedSignature) + re := regexp.MustCompile(expectedAuthorizationHeader) + if !re.MatchString(authorizationHeaderValue) { + t.Errorf("Authorization header value is incorrect. Got\n'%s'\nbut expected\n'%s'", authorizationHeaderValue, expectedAuthorizationHeader) + } +} + +func TestInvalidHttpSignatureConfiguration(t *testing.T) { + var err error + var authConfig HttpSignatureAuth + + authConfig = HttpSignatureAuth{ + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Key ID must be specified") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Private key path must be specified") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Invalid signing scheme") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: "garbage", + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Invalid signing scheme") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"foo", "bar", "foo"}, + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "cannot have duplicate names") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"foo", "bar", "Authorization"}, + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Signed headers cannot include the 'Authorization' header") { + t.Fatalf("Invalid configuration: %v", err) + } + + authConfig = HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "test.pem", + SigningScheme: HttpSigningSchemeHs2019, + SignedHeaders: []string{"foo", "bar"}, + SignatureMaxValidity: -7 * time.Minute, + } + _, err = authConfig.ContextWithValue(context.Background()) + if err == nil || !strings.Contains(err.Error(), "Signature max validity must be a positive value") { + t.Fatalf("Invalid configuration: %v", err) + } +} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/signing.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/signing.go new file mode 100644 index 000000000000..d28fd6a379e3 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/signing.go @@ -0,0 +1,422 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstore + +import ( + "bytes" + "context" + "crypto" + "crypto/ecdsa" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/textproto" + "os" + "strings" + "time" +) + +const ( + // Constants for HTTP signature parameters. + // The '(request-target)' parameter concatenates the lowercased :method, an + // ASCII space, and the :path pseudo-headers. + HttpSignatureParameterRequestTarget string = "(request-target)" + // The '(created)' parameter expresses when the signature was + // created. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterCreated string = "(created)" + // The '(expires)' parameter expresses when the signature ceases to + // be valid. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterExpires string = "(expires)" +) + +const ( + // Constants for HTTP headers. + // The 'Host' header, as defined in RFC 2616, section 14.23. + HttpHeaderHost string = "Host" + // The 'Date' header. + HttpHeaderDate string = "Date" + // The digest header, as defined in RFC 3230, section 4.3.2. + HttpHeaderDigest string = "Digest" + // The HTTP Authorization header, as defined in RFC 7235, section 4.2. + HttpHeaderAuthorization string = "Authorization" +) + +const ( + // Specifies the Digital Signature Algorithm is derived from metadata + // associated with 'keyId'. Supported DSA algorithms are RSASSA-PKCS1-v1_5, + // RSASSA-PSS, and ECDSA. + // The hash is SHA-512. + // This is the default value. + HttpSigningSchemeHs2019 string = "hs2019" + // Use RSASSA-PKCS1-v1_5 with SHA-512 hash. Deprecated. + HttpSigningSchemeRsaSha512 string = "rsa-sha512" + // Use RSASSA-PKCS1-v1_5 with SHA-256 hash. Deprecated. + HttpSigningSchemeRsaSha256 string = "rsa-sha256" + + // RFC 8017 section 7.2 + // Calculate the message signature using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5. + // PKCSV1_5 is deterministic. The same message and key will produce an identical + // signature value each time. + HttpSigningAlgorithmRsaPKCS1v15 string = "RSASSA-PKCS1-v1_5" + // Calculate the message signature using probabilistic signature scheme RSASSA-PSS. + // PSS is randomized and will produce a different signature value each time. + HttpSigningAlgorithmRsaPSS string = "RSASSA-PSS" +) + +var supportedSigningSchemes = map[string]bool{ + HttpSigningSchemeHs2019: true, + HttpSigningSchemeRsaSha512: true, + HttpSigningSchemeRsaSha256: true, +} + + +// HttpSignatureAuth provides HTTP signature authentication to a request passed +// via context using ContextHttpSignatureAuth. +// 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 which is available to the client. +// +// SignedHeaders specifies the list of HTTP headers that are included when generating +// the message signature. +// 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. +// +// For example, SignedHeaders can be set to: +// (request-target) (created) date host digest +// +// When SignedHeaders 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. +type HttpSignatureAuth struct { + KeyId string // A key identifier. + PrivateKeyPath string // The path to the private key. + Passphrase string // The passphrase to decrypt the private key, if the key is encrypted. + SigningScheme string // The signature scheme, when signing HTTP requests. Supported value is 'hs2019'. + // The signature algorithm, when signing HTTP requests. + // Supported values are RSASSA-PKCS1-v1_5, RSASSA-PSS. + SigningAlgorithm string + SignedHeaders []string // A list of HTTP headers included when generating the signature for the message. + // SignatureMaxValidity specifies the maximum duration of the signature validity. + // The value is used to set the '(expires)' signature parameter in the HTTP request. + // '(expires)' is set to '(created)' plus the value of the SignatureMaxValidity field. + // To specify the '(expires)' signature parameter, set 'SignatureMaxValidity' and add '(expires)' to 'SignedHeaders'. + SignatureMaxValidity time.Duration + privateKey crypto.PrivateKey // The private key used to sign HTTP requests. +} + +// ContextWithValue validates the HttpSignatureAuth configuration parameters and returns a context +// suitable for HTTP signature. An error is returned if the HttpSignatureAuth configuration parameters +// are invalid. +func (h *HttpSignatureAuth) ContextWithValue(ctx context.Context) (context.Context, error) { + if h.KeyId == "" { + return nil, fmt.Errorf("Key ID must be specified") + } + if h.PrivateKeyPath == "" { + return nil, fmt.Errorf("Private key path must be specified") + } + if _, ok := supportedSigningSchemes[h.SigningScheme]; !ok { + return nil, fmt.Errorf("Invalid signing scheme: '%v'", h.SigningScheme) + } + m := make(map[string]bool) + for _, h := range h.SignedHeaders { + if strings.ToLower(h) == strings.ToLower(HttpHeaderAuthorization) { + return nil, fmt.Errorf("Signed headers cannot include the 'Authorization' header") + } + m[h] = true + } + if len(m) != len(h.SignedHeaders) { + return nil, fmt.Errorf("List of signed headers cannot have duplicate names") + } + if h.SignatureMaxValidity < 0 { + return nil, fmt.Errorf("Signature max validity must be a positive value") + } + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + return context.WithValue(ctx, ContextHttpSignatureAuth, *h), nil +} + +// GetPublicKey returns the public key associated with this HTTP signature configuration. +func (h *HttpSignatureAuth) GetPublicKey() (crypto.PublicKey, error) { + if h.privateKey == nil { + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + } + switch key := h.privateKey.(type) { + case *rsa.PrivateKey: + return key.Public(), nil + case *ecdsa.PrivateKey: + return key.Public(), nil + default: + // Do not change '%T' to anything else such as '%v'! + // The value of the private key must not be returned. + return nil, fmt.Errorf("Unsupported key: %T", h.privateKey) + } +} + +// loadPrivateKey reads the private key from the file specified in the HttpSignatureAuth. +func (h *HttpSignatureAuth) loadPrivateKey() (err error) { + var file *os.File + file, err = os.Open(h.PrivateKeyPath) + if err != nil { + return fmt.Errorf("Cannot load private key '%s'. Error: %v", h.PrivateKeyPath, err) + } + defer func() { + err = file.Close() + }() + var priv []byte + priv, err = ioutil.ReadAll(file) + if err != nil { + return err + } + pemBlock, _ := pem.Decode(priv) + if pemBlock == nil { + // No PEM data has been found. + return fmt.Errorf("File '%s' does not contain PEM data", h.PrivateKeyPath) + } + var privKey []byte + if x509.IsEncryptedPEMBlock(pemBlock) { + // The PEM data is encrypted. + privKey, err = x509.DecryptPEMBlock(pemBlock, []byte(h.Passphrase)) + if err != nil { + // Failed to decrypt PEM block. Because of deficiencies in the encrypted-PEM format, + // it's not always possibleto detect an incorrect password. + return err + } + } else { + privKey = pemBlock.Bytes + } + switch pemBlock.Type { + case "RSA PRIVATE KEY": + if h.privateKey, err = x509.ParsePKCS1PrivateKey(privKey); err != nil { + return err + } + case "EC PRIVATE KEY", "PRIVATE KEY": + // https://tools.ietf.org/html/rfc5915 section 4. + if h.privateKey, err = x509.ParsePKCS8PrivateKey(privKey); err != nil { + return err + } + default: + return fmt.Errorf("Key '%s' is not supported", pemBlock.Type) + } + return nil +} + +// SignRequest signs the request using HTTP signature. +// See https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ +// +// Do not add, remove or change headers that are included in the SignedHeaders +// after SignRequest has been invoked; this is because the header values are +// included in the signature. Any subsequent alteration will cause a signature +// verification failure. +// If there are multiple instances of the same header field, all +// header field values associated with the header field MUST be +// concatenated, separated by a ASCII comma and an ASCII space +// ', ', and used in the order in which they will appear in the +// transmitted HTTP message. +func SignRequest( + ctx context.Context, + r *http.Request, + auth HttpSignatureAuth) error { + + if auth.privateKey == nil { + return fmt.Errorf("Private key is not set") + } + now := time.Now() + date := now.UTC().Format(http.TimeFormat) + // The 'created' field expresses when the signature was created. + // The value MUST be a Unix timestamp integer value. See 'HTTP signature' section 2.1.4. + created := now.Unix() + + var h crypto.Hash + var err error + var prefix string + var expiresUnix float64 + + if auth.SignatureMaxValidity < 0 { + return fmt.Errorf("Signature validity must be a positive value") + } + if auth.SignatureMaxValidity > 0 { + e := now.Add(auth.SignatureMaxValidity) + expiresUnix = float64(e.Unix()) + float64(e.Nanosecond()) / float64(time.Second) + } + // Determine the cryptographic hash to be used for the signature and the body digest. + switch auth.SigningScheme { + case HttpSigningSchemeRsaSha512, HttpSigningSchemeHs2019: + h = crypto.SHA512 + prefix = "SHA-512=" + case HttpSigningSchemeRsaSha256: + // This is deprecated and should no longer be used. + h = crypto.SHA256 + prefix = "SHA-256=" + default: + return fmt.Errorf("Unsupported signature scheme: %v", auth.SigningScheme) + } + if !h.Available() { + return fmt.Errorf("Hash '%v' is not available", h) + } + + // Build the "(request-target)" signature header. + var sb bytes.Buffer + fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Method), r.URL.EscapedPath()) + if r.URL.RawQuery != "" { + // The ":path" pseudo-header field includes the path and query parts + // of the target URI (the "path-absolute" production and optionally a + // '?' character followed by the "query" production (see Sections 3.3 + // and 3.4 of [RFC3986] + fmt.Fprintf(&sb, "?%s", r.URL.RawQuery) + } + requestTarget := sb.String() + sb.Reset() + + // Build the string to be signed. + signedHeaders := auth.SignedHeaders + if len(signedHeaders) == 0 { + signedHeaders = []string{HttpSignatureParameterCreated} + } + // Validate the list of signed headers has no duplicates. + m := make(map[string]bool) + for _, h := range signedHeaders { + m[h] = true + } + if len(m) != len(signedHeaders) { + return fmt.Errorf("List of signed headers must not have any duplicates") + } + hasCreatedParameter := false + hasExpiresParameter := false + for i, header := range signedHeaders { + header = strings.ToLower(header) + var value string + switch header { + case strings.ToLower(HttpHeaderAuthorization): + return fmt.Errorf("Cannot include the 'Authorization' header as a signed header.") + case HttpSignatureParameterRequestTarget: + value = requestTarget + case HttpSignatureParameterCreated: + value = fmt.Sprintf("%d", created) + hasCreatedParameter = true + case HttpSignatureParameterExpires: + if auth.SignatureMaxValidity.Nanoseconds() == 0 { + return fmt.Errorf("Cannot set '(expires)' signature parameter. SignatureMaxValidity is not configured.") + } + value = fmt.Sprintf("%.3f", expiresUnix) + hasExpiresParameter = true + case "date": + value = date + r.Header.Set(HttpHeaderDate, date) + case "digest": + // Calculate the digest of the HTTP request body. + // Calculate body digest per RFC 3230 section 4.3.2 + bodyHash := h.New() + if r.Body != nil { + // Make a copy of the body io.Reader so that we can read the body to calculate the hash, + // then one more time when marshaling the request. + var body io.Reader + body, err = r.GetBody() + if err != nil { + return err + } + if _, err = io.Copy(bodyHash, body); err != nil { + return err + } + } + d := bodyHash.Sum(nil) + value = prefix + base64.StdEncoding.EncodeToString(d) + r.Header.Set(HttpHeaderDigest, value) + case "host": + value = r.Host + r.Header.Set(HttpHeaderHost, r.Host) + default: + var ok bool + var v []string + canonicalHeader := textproto.CanonicalMIMEHeaderKey(header) + if v, ok = r.Header[canonicalHeader]; !ok { + // If a header specified in the headers parameter cannot be matched with + // a provided header in the message, the implementation MUST produce an error. + return fmt.Errorf("Header '%s' does not exist in the request", canonicalHeader) + } + // If there are multiple instances of the same header field, all + // header field values associated with the header field MUST be + // concatenated, separated by a ASCII comma and an ASCII space + // `, `, and used in the order in which they will appear in the + // transmitted HTTP message. + value = strings.Join(v, ", ") + } + if i > 0 { + fmt.Fprintf(&sb, "\n") + } + fmt.Fprintf(&sb, "%s: %s", header, value) + } + if expiresUnix != 0 && !hasExpiresParameter { + return fmt.Errorf("SignatureMaxValidity is specified, but '(expired)' parameter is not present") + } + msg := []byte(sb.String()) + msgHash := h.New() + if _, err = msgHash.Write(msg); err != nil { + return err + } + d := msgHash.Sum(nil) + + var signature []byte + switch key := auth.privateKey.(type) { + case *rsa.PrivateKey: + switch auth.SigningAlgorithm { + case HttpSigningAlgorithmRsaPKCS1v15: + signature, err = rsa.SignPKCS1v15(rand.Reader, key, h, d) + case "", HttpSigningAlgorithmRsaPSS: + signature, err = rsa.SignPSS(rand.Reader, key, h, d, nil) + default: + return fmt.Errorf("Unsupported signing algorithm: '%s'", auth.SigningAlgorithm) + } + case *ecdsa.PrivateKey: + signature, err = key.Sign(rand.Reader, d, h) + //case ed25519.PrivateKey: requires go 1.13 + // signature, err = key.Sign(rand.Reader, msg, crypto.Hash(0)) + default: + return fmt.Errorf("Unsupported private key") + } + if err != nil { + return err + } + + sb.Reset() + for i, header := range signedHeaders { + if i > 0 { + sb.WriteRune(' ') + } + sb.WriteString(strings.ToLower(header)) + } + headers_list := sb.String() + sb.Reset() + fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, auth.KeyId, auth.SigningScheme) + if hasCreatedParameter { + fmt.Fprintf(&sb, "created=%d,", created) + } + if hasExpiresParameter { + fmt.Fprintf(&sb, "expires=%.3f,", expiresUnix) + } + fmt.Fprintf(&sb, `headers="%s",signature="%s"`, headers_list, base64.StdEncoding.EncodeToString(signature)) + authStr := sb.String() + r.Header.Set(HttpHeaderAuthorization, authStr) + return nil +} From a496c2011f7b8a1ca71f40841be4271f2db2a3ef Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sat, 1 Feb 2020 20:51:55 -0500 Subject: [PATCH 43/72] [docs] Initial FeatureSet generator documentation (#5188) * Flatten feature sets for display * [cli] Add feature set output to config-help This includes markdown and plain text outputs for config-help. * [docs] FeatureSet on generator docs --- docs/generators/ada-server.md | 108 +++++++++++ docs/generators/ada.md | 108 +++++++++++ docs/generators/android.md | 108 +++++++++++ docs/generators/apache2.md | 108 +++++++++++ docs/generators/apex.md | 108 +++++++++++ docs/generators/asciidoc.md | 108 +++++++++++ docs/generators/aspnetcore.md | 108 +++++++++++ docs/generators/avro-schema.md | 108 +++++++++++ docs/generators/bash.md | 108 +++++++++++ docs/generators/c.md | 108 +++++++++++ docs/generators/clojure.md | 108 +++++++++++ docs/generators/cpp-pistache-server.md | 108 +++++++++++ docs/generators/cpp-qt5-client.md | 108 +++++++++++ docs/generators/cpp-qt5-qhttpengine-server.md | 108 +++++++++++ docs/generators/cpp-restbed-server.md | 108 +++++++++++ docs/generators/cpp-restsdk.md | 108 +++++++++++ docs/generators/cpp-tizen.md | 108 +++++++++++ docs/generators/csharp-dotnet2.md | 108 +++++++++++ docs/generators/csharp-nancyfx.md | 108 +++++++++++ docs/generators/csharp-netcore.md | 108 +++++++++++ docs/generators/csharp.md | 108 +++++++++++ docs/generators/cwiki.md | 108 +++++++++++ docs/generators/dart-dio.md | 108 +++++++++++ docs/generators/dart-jaguar.md | 108 +++++++++++ docs/generators/dart.md | 108 +++++++++++ docs/generators/dynamic-html.md | 108 +++++++++++ docs/generators/eiffel.md | 108 +++++++++++ docs/generators/elixir.md | 108 +++++++++++ docs/generators/elm.md | 108 +++++++++++ docs/generators/erlang-client.md | 108 +++++++++++ docs/generators/erlang-proper.md | 108 +++++++++++ docs/generators/erlang-server.md | 108 +++++++++++ docs/generators/flash.md | 108 +++++++++++ docs/generators/fsharp-functions.md | 108 +++++++++++ docs/generators/fsharp-giraffe-server.md | 108 +++++++++++ docs/generators/go-experimental.md | 108 +++++++++++ docs/generators/go-gin-server.md | 108 +++++++++++ docs/generators/go-server.md | 108 +++++++++++ docs/generators/go.md | 108 +++++++++++ .../graphql-nodejs-express-server.md | 108 +++++++++++ docs/generators/graphql-schema.md | 108 +++++++++++ docs/generators/groovy.md | 108 +++++++++++ docs/generators/haskell-http-client.md | 108 +++++++++++ docs/generators/haskell.md | 108 +++++++++++ docs/generators/html.md | 108 +++++++++++ docs/generators/html2.md | 108 +++++++++++ docs/generators/java-inflector.md | 108 +++++++++++ docs/generators/java-msf4j.md | 108 +++++++++++ docs/generators/java-pkmst.md | 108 +++++++++++ docs/generators/java-play-framework.md | 108 +++++++++++ docs/generators/java-undertow-server.md | 108 +++++++++++ docs/generators/java-vertx-web.md | 108 +++++++++++ docs/generators/java-vertx.md | 108 +++++++++++ docs/generators/java.md | 108 +++++++++++ docs/generators/javascript-closure-angular.md | 108 +++++++++++ docs/generators/javascript-flowtyped.md | 108 +++++++++++ docs/generators/javascript.md | 108 +++++++++++ docs/generators/jaxrs-cxf-cdi.md | 108 +++++++++++ docs/generators/jaxrs-cxf-client.md | 108 +++++++++++ docs/generators/jaxrs-cxf-extended.md | 108 +++++++++++ docs/generators/jaxrs-cxf.md | 108 +++++++++++ docs/generators/jaxrs-jersey.md | 108 +++++++++++ docs/generators/jaxrs-resteasy-eap.md | 108 +++++++++++ docs/generators/jaxrs-resteasy.md | 108 +++++++++++ docs/generators/jaxrs-spec.md | 108 +++++++++++ docs/generators/jmeter.md | 108 +++++++++++ docs/generators/kotlin-server.md | 108 +++++++++++ docs/generators/kotlin-spring.md | 108 +++++++++++ docs/generators/kotlin-vertx.md | 108 +++++++++++ docs/generators/kotlin.md | 108 +++++++++++ docs/generators/lua.md | 108 +++++++++++ docs/generators/markdown.md | 108 +++++++++++ docs/generators/mysql-schema.md | 108 +++++++++++ docs/generators/nim.md | 108 +++++++++++ docs/generators/nodejs-express-server.md | 108 +++++++++++ docs/generators/nodejs-server-deprecated.md | 108 +++++++++++ docs/generators/objc.md | 108 +++++++++++ docs/generators/ocaml.md | 108 +++++++++++ docs/generators/openapi-yaml.md | 108 +++++++++++ docs/generators/openapi.md | 108 +++++++++++ docs/generators/perl.md | 108 +++++++++++ docs/generators/php-laravel.md | 108 +++++++++++ docs/generators/php-lumen.md | 108 +++++++++++ docs/generators/php-silex.md | 108 +++++++++++ docs/generators/php-slim-deprecated.md | 108 +++++++++++ docs/generators/php-slim4.md | 108 +++++++++++ docs/generators/php-symfony.md | 108 +++++++++++ docs/generators/php-ze-ph.md | 108 +++++++++++ docs/generators/php.md | 108 +++++++++++ docs/generators/powershell.md | 108 +++++++++++ docs/generators/protobuf-schema.md | 108 +++++++++++ docs/generators/python-aiohttp.md | 108 +++++++++++ docs/generators/python-blueplanet.md | 108 +++++++++++ docs/generators/python-experimental.md | 108 +++++++++++ docs/generators/python-flask.md | 108 +++++++++++ docs/generators/python.md | 108 +++++++++++ docs/generators/r.md | 108 +++++++++++ docs/generators/ruby-on-rails.md | 108 +++++++++++ docs/generators/ruby-sinatra.md | 108 +++++++++++ docs/generators/ruby.md | 108 +++++++++++ docs/generators/rust-server.md | 108 +++++++++++ docs/generators/rust.md | 108 +++++++++++ docs/generators/scala-akka.md | 108 +++++++++++ docs/generators/scala-finch.md | 108 +++++++++++ docs/generators/scala-gatling.md | 108 +++++++++++ .../generators/scala-httpclient-deprecated.md | 108 +++++++++++ docs/generators/scala-lagom-server.md | 108 +++++++++++ docs/generators/scala-play-server.md | 108 +++++++++++ docs/generators/scalatra.md | 108 +++++++++++ docs/generators/scalaz.md | 108 +++++++++++ docs/generators/spring.md | 108 +++++++++++ docs/generators/swift2-deprecated.md | 108 +++++++++++ docs/generators/swift3-deprecated.md | 108 +++++++++++ docs/generators/swift4.md | 108 +++++++++++ docs/generators/swift5.md | 108 +++++++++++ docs/generators/typescript-angular.md | 108 +++++++++++ docs/generators/typescript-angularjs.md | 108 +++++++++++ docs/generators/typescript-aurelia.md | 108 +++++++++++ docs/generators/typescript-axios.md | 108 +++++++++++ docs/generators/typescript-fetch.md | 108 +++++++++++ docs/generators/typescript-inversify.md | 108 +++++++++++ docs/generators/typescript-jquery.md | 108 +++++++++++ docs/generators/typescript-node.md | 108 +++++++++++ docs/generators/typescript-redux-query.md | 108 +++++++++++ docs/generators/typescript-rxjs.md | 108 +++++++++++ .../openapitools/codegen/cmd/ConfigHelp.java | 135 ++++++++------ .../openapitools/codegen/meta/FeatureSet.java | 167 +++++++++++++++++- .../features/annotations/AnnotationType.java | 12 ++ .../codegen/meta/FeatureSetTest.java | 136 ++++++++++++++ 129 files changed, 13898 insertions(+), 52 deletions(-) create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/AnnotationType.java create mode 100644 modules/openapi-generator-core/src/test/java/org/openapitools/codegen/meta/FeatureSetTest.java diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 61f5b1c53e2d..d87f699e24c4 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -111,3 +111,111 @@ sidebar_label: ada-server
  • with
  • xor
  • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✗|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 60d6a74739d6..f92b7f055bc4 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -111,3 +111,111 @@ sidebar_label: ada
  • with
  • xor
  • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/android.md b/docs/generators/android.md index 8bcc419aa7a3..0c13f292bf68 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -134,3 +134,111 @@ sidebar_label: android
  • volatile
  • while
  • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 80dbcb60ff3f..33b5a50f1a1a 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -47,3 +47,111 @@ sidebar_label: apache2 ## RESERVED WORDS
      + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✗|OAS2,OAS3 +|Int64|✗|OAS2,OAS3 +|Float|✗|OAS2,OAS3 +|Double|✗|OAS2,OAS3 +|Decimal|✗|ToolingExtension +|String|✗|OAS2,OAS3 +|Byte|✗|OAS2,OAS3 +|Binary|✗|OAS2,OAS3 +|Boolean|✗|OAS2,OAS3 +|Date|✗|OAS2,OAS3 +|DateTime|✗|OAS2,OAS3 +|Password|✗|OAS2,OAS3 +|File|✗|OAS2 +|Array|✗|OAS2,OAS3 +|Maps|✗|ToolingExtension +|CollectionFormat|✗|OAS2 +|CollectionFormatMulti|✗|OAS2 +|Enum|✗|OAS2,OAS3 +|ArrayOfEnum|✗|ToolingExtension +|ArrayOfModel|✗|ToolingExtension +|ArrayOfCollectionOfPrimitives|✗|ToolingExtension +|ArrayOfCollectionOfModel|✗|ToolingExtension +|ArrayOfCollectionOfEnum|✗|ToolingExtension +|MapOfEnum|✗|ToolingExtension +|MapOfModel|✗|ToolingExtension +|MapOfCollectionOfPrimitives|✗|ToolingExtension +|MapOfCollectionOfModel|✗|ToolingExtension +|MapOfCollectionOfEnum|✗|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✗|ToolingExtension +|Api|✗|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✗|OAS2,OAS3 +|BasePath|✗|OAS2,OAS3 +|Info|✗|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✗|OAS2,OAS3 +|Consumes|✗|OAS2 +|Produces|✗|OAS2 +|ExternalDocumentation|✗|OAS2,OAS3 +|Examples|✗|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✗|OAS2,OAS3 +|Header|✗|OAS2,OAS3 +|Body|✗|OAS2 +|FormUnencoded|✗|OAS2 +|FormMultipart|✗|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✗|OAS2,OAS3 +|Composite|✗|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✗|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/apex.md b/docs/generators/apex.md index d80fb0f3fe4d..d2cca3188107 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -184,3 +184,111 @@ sidebar_label: apex
    • while
    • yesterday
    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 9243aafaceb1..7cee688c39e0 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -43,3 +43,111 @@ sidebar_label: asciidoc ## RESERVED WORDS
        + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✗|ToolingExtension +|Api|✗|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✗|OAS2,OAS3 +|BasePath|✗|OAS2,OAS3 +|Info|✗|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✗|OAS2,OAS3 +|Consumes|✗|OAS2 +|Produces|✗|OAS2 +|ExternalDocumentation|✗|OAS2,OAS3 +|Examples|✗|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✗|OAS2,OAS3 +|Composite|✗|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index eda0e8a9f26f..d580ee1e8826 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -189,3 +189,111 @@ sidebar_label: aspnetcore
      • while
      • yield
      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 45256f48950b..633728ae8b17 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -48,3 +48,111 @@ sidebar_label: avro-schema ## RESERVED WORDS
          + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✗|ToolingExtension +|Api|✗|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✗|OAS2,OAS3 +|BasePath|✗|OAS2,OAS3 +|Info|✗|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✗|OAS2,OAS3 +|Consumes|✗|OAS2 +|Produces|✗|OAS2 +|ExternalDocumentation|✗|OAS2,OAS3 +|Examples|✗|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✗|OAS2,OAS3 +|Query|✗|OAS2,OAS3 +|Header|✗|OAS2,OAS3 +|Body|✗|OAS2 +|FormUnencoded|✗|OAS2 +|FormMultipart|✗|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✗|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/bash.md b/docs/generators/bash.md index c56cbd4047ab..77647aa06980 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -77,3 +77,111 @@ sidebar_label: bash
        • until
        • while
        • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✗|ToolingExtension +|Api|✗|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/c.md b/docs/generators/c.md index 400db5b79a3b..7f8e047a95dc 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -86,3 +86,111 @@ sidebar_label: c
        • volatile
        • while
        • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index ce4976940427..dadd327272d9 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -53,3 +53,111 @@ sidebar_label: clojure ## RESERVED WORDS
            + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index fde4459144b3..1de625d45003 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -40,3 +40,111 @@ sidebar_label: cpp-pistache-server ## RESERVED WORDS
              + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 5677ef13d085..2d510c95849d 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -131,3 +131,111 @@ sidebar_label: cpp-qt5-client
            • xor
            • xor_eq
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 4d9518c2bea4..2b4ca0653f6b 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -130,3 +130,111 @@ sidebar_label: cpp-qt5-qhttpengine-server
            • xor
            • xor_eq
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 4c59be6e67a2..7758938f2012 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -130,3 +130,111 @@ sidebar_label: cpp-restbed-server
            • xor
            • xor_eq
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 6bf209af7964..9a368d34bdcf 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -133,3 +133,111 @@ sidebar_label: cpp-restsdk
            • xor
            • xor_eq
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index 4cabf3db4431..58bc494e67b4 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -128,3 +128,111 @@ sidebar_label: cpp-tizen
            • xor
            • xor_eq
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index adf5841d42f3..09d34f5b3e20 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -156,3 +156,111 @@ sidebar_label: csharp-dotnet2
            • volatile
            • while
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index 48913347f599..693cd51a16f9 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -82,3 +82,111 @@ sidebar_label: csharp-nancyfx
            • var
            • yield
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 8cf2d0ee54ad..9010fd0b26c5 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -177,3 +177,111 @@ sidebar_label: csharp-netcore
            • volatile
            • while
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 4ec890a4e8b5..f17d0426b900 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -176,3 +176,111 @@ sidebar_label: csharp
            • volatile
            • while
            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 9765e1cc584c..76c237883600 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -40,3 +40,111 @@ sidebar_label: cwiki ## RESERVED WORDS
                + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✗|ToolingExtension +|Api|✗|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 3445c7e16581..f774dc659563 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -122,3 +122,111 @@ sidebar_label: dart-dio
              • with
              • yield
              • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 78f1eac7d5d7..c8775bb8a8c6 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -118,3 +118,111 @@ sidebar_label: dart-jaguar
              • with
              • yield
              • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 8b1bd158c300..73f968a0fb9f 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -116,3 +116,111 @@ sidebar_label: dart
              • with
              • yield
              • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 1fa63d343487..6061921eac2c 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -36,3 +36,111 @@ sidebar_label: dynamic-html ## RESERVED WORDS
                  + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✓|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✓|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✓|OAS3 +|ParameterizedServer|✓|OAS3 +|ParameterStyling|✓|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✓|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✓|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✓|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✓|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index 2f239b7c407b..01cf9b7af96c 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -118,3 +118,111 @@ sidebar_label: eiffel
                • when
                • xor
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index fae1d80bd379..f7ae13337cf9 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -67,3 +67,111 @@ sidebar_label: elixir
                • nil
                • true
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/elm.md b/docs/generators/elm.md index aa3fe4f49bdf..c276f43c8550 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -51,3 +51,111 @@ sidebar_label: elm
                • type
                • where
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 72e4df60613c..4186a3f6ecba 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -70,3 +70,111 @@ sidebar_label: erlang-client
                • when
                • xor
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 6d48712bdc6a..0f5c8e46ea1f 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -70,3 +70,111 @@ sidebar_label: erlang-proper
                • when
                • xor
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 8db2184f0d9d..490943d88c67 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -70,3 +70,111 @@ sidebar_label: erlang-server
                • when
                • xor
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/flash.md b/docs/generators/flash.md index 5d6fd829b168..7d4295ab25f8 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -67,3 +67,111 @@ sidebar_label: flash
                • while
                • with
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 389c94b13388..873962059947 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -185,3 +185,111 @@ sidebar_label: fsharp-functions
                • yield
                • yield!
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✗|OAS2,OAS3 +|BasePath|✗|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index d05383c75dec..23d6fb0ae2aa 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -187,3 +187,111 @@ sidebar_label: fsharp-giraffe-server
                • yield
                • yield!
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md index 6099220d652d..9db534703cfb 100644 --- a/docs/generators/go-experimental.md +++ b/docs/generators/go-experimental.md @@ -95,3 +95,111 @@ sidebar_label: go-experimental
                • uintptr
                • var
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 189705f0920f..3e57af97856e 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -88,3 +88,111 @@ sidebar_label: go-gin-server
                • uintptr
                • var
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index 0125db11e995..563c10319d64 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -91,3 +91,111 @@ sidebar_label: go-server
                • uintptr
                • var
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/go.md b/docs/generators/go.md index 1d8909bbfcdf..8d860da0f90d 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -95,3 +95,111 @@ sidebar_label: go
                • uintptr
                • var
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 8200c47531f5..c3585363a07f 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -61,3 +61,111 @@ sidebar_label: graphql-nodejs-express-server
                • type
                • union
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index 5cc481fa24ef..9efd9611cafe 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -61,3 +61,111 @@ sidebar_label: graphql-schema
                • type
                • union
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 13e9a1a61938..c502298ba715 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -161,3 +161,111 @@ sidebar_label: groovy
                • volatile
                • while
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index 3a68e2276a68..4a60d794fa3e 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -95,3 +95,111 @@ sidebar_label: haskell-http-client
                • type
                • where
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 3e0cb77314db..ad7ac2d1993f 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -73,3 +73,111 @@ sidebar_label: haskell
                • type
                • where
                • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/html.md b/docs/generators/html.md index d538d0f91d69..433cf84bbb2d 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -40,3 +40,111 @@ sidebar_label: html ## RESERVED WORDS
                    + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✓|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✓|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✓|OAS3 +|ParameterizedServer|✓|OAS3 +|ParameterStyling|✓|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✓|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✓|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✓|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✓|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 82374353c401..9e05e5661c8a 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -44,3 +44,111 @@ sidebar_label: html2 ## RESERVED WORDS
                      + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✓|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✓|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✓|OAS3 +|ParameterizedServer|✓|OAS3 +|ParameterStyling|✓|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✓|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✓|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✓|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✓|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 9a0da4b39a1d..44630e5f05c7 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -159,3 +159,111 @@ sidebar_label: java-inflector
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index d0ecb290ff81..a0d46e7c1d92 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -164,3 +164,111 @@ sidebar_label: java-msf4j
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 8ab96c097dd3..a03b3c70960c 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -166,3 +166,111 @@ sidebar_label: java-pkmst
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index c0875184092f..875c423a6a1a 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -168,3 +168,111 @@ sidebar_label: java-play-framework
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 3e13225d8d4f..5b41e7baa704 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -159,3 +159,111 @@ sidebar_label: java-undertow-server
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 584fae2dc242..eb5cd669a3a2 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -159,3 +159,111 @@ sidebar_label: java-vertx-web
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index ea93520b0be3..1eba9c6c636f 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -162,3 +162,111 @@ sidebar_label: java-vertx
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/java.md b/docs/generators/java.md index fddd7ba9ff97..8127246b92ff 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -174,3 +174,111 @@ sidebar_label: java
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 0308a0a824cf..e81aced2cb2a 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -83,3 +83,111 @@ sidebar_label: javascript-closure-angular
                    • void
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 8cf943fa3170..125b0778a84f 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -135,3 +135,111 @@ sidebar_label: javascript-flowtyped
                    • with
                    • yield
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 7064b4a28705..492a2f13abed 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -137,3 +137,111 @@ sidebar_label: javascript
                    • with
                    • yield
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 0842a00ccef5..6d8abb15dad3 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -169,3 +169,111 @@ sidebar_label: jaxrs-cxf-cdi
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 713ef854781c..0206dc3138a4 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -163,3 +163,111 @@ sidebar_label: jaxrs-cxf-client
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 14e899514152..e3d415818527 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -185,3 +185,111 @@ sidebar_label: jaxrs-cxf-extended
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 1fc41f7b179b..f80d3b8efb4a 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -180,3 +180,111 @@ sidebar_label: jaxrs-cxf
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index d1851341f62b..359c80709be5 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -166,3 +166,111 @@ sidebar_label: jaxrs-jersey
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 378769bd75f9..1e38e58691ac 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -165,3 +165,111 @@ sidebar_label: jaxrs-resteasy-eap
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 9b85ad5e172a..e37467c74bc5 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -164,3 +164,111 @@ sidebar_label: jaxrs-resteasy
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index d9c32ce88abd..697c33c7de52 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -169,3 +169,111 @@ sidebar_label: jaxrs-spec
                    • volatile
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 2aff0efbb2bd..ebb69073c58c 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -48,3 +48,111 @@ sidebar_label: jmeter
                      • sample1
                      • sample2
                      + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index cffcda881f88..0b3dfa2cdca6 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -99,3 +99,111 @@ sidebar_label: kotlin-server
                    • when
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 11d7a924b2d2..b177c8968779 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -111,3 +111,111 @@ sidebar_label: kotlin-spring
                    • when
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 20a85045d089..43c1d6c46d62 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -93,3 +93,111 @@ sidebar_label: kotlin-vertx
                    • when
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index cdd75b892775..dc24c8130276 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -97,3 +97,111 @@ sidebar_label: kotlin
                    • when
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/lua.md b/docs/generators/lua.md index 406227033416..b7eab0cfa5bc 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -62,3 +62,111 @@ sidebar_label: lua
                    • userdata
                    • while
                    • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 3c7777b2a905..8d8a2a907802 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -46,3 +46,111 @@ sidebar_label: markdown ## RESERVED WORDS
                        + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 67e235168b31..d0510c33303e 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -314,3 +314,111 @@ sidebar_label: mysql-schema
                      • year_month
                      • zerofill
                      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✗|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 946669ccbe51..306329177da8 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -130,3 +130,111 @@ sidebar_label: nim
                      • xor
                      • yield
                      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index b0a8db1c497d..9a9bd5e7e748 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -81,3 +81,111 @@ sidebar_label: nodejs-express-server
                      • with
                      • yield
                      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index 0967505e6833..c3e70b7e84ba 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -83,3 +83,111 @@ sidebar_label: nodejs-server-deprecated
                      • with
                      • yield
                      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/objc.md b/docs/generators/objc.md index 49148761b662..115bd2528038 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -104,3 +104,111 @@ sidebar_label: objc
                      • weak
                      • while
                      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 87721f59841c..6a87a5358abd 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -112,3 +112,111 @@ sidebar_label: ocaml
                      • while
                      • with
                      • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 96021a3a3e74..cb5a6459bd93 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -47,3 +47,111 @@ sidebar_label: openapi-yaml ## RESERVED WORDS
                          + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✓|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✓|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✓|OAS3 +|ParameterizedServer|✓|OAS3 +|ParameterStyling|✓|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✓|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✓|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✓|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✓|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 95b8fd6ace01..7a396ad773d2 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -46,3 +46,111 @@ sidebar_label: openapi ## RESERVED WORDS
                            + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✓|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✓|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✓|OAS3 +|ParameterizedServer|✓|OAS3 +|ParameterStyling|✓|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✓|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✓|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✓|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✓|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 3a65f291a45c..bc59a014b633 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -79,3 +79,111 @@ sidebar_label: perl
                          • xor
                          • y
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index a0b7443d8719..b8caa87b5538 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -140,3 +140,111 @@ sidebar_label: php-laravel
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 4a33196eca3d..92f185a4bc6f 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -140,3 +140,111 @@ sidebar_label: php-lumen
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index 7c515f135ed3..2a5ea38682ce 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -123,3 +123,111 @@ sidebar_label: php-silex
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 7e6cd21fdbce..f2c282695ef8 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -124,3 +124,111 @@ sidebar_label: php-slim-deprecated
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index 1e96ca09b3a6..6174cdde0071 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -125,3 +125,111 @@ sidebar_label: php-slim4
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index a6fbd33e4569..365daa034fa0 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -128,3 +128,111 @@ sidebar_label: php-symfony
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index 99bf251414d6..f58ace643c1b 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -140,3 +140,111 @@ sidebar_label: php-ze-ph
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/php.md b/docs/generators/php.md index b8de32ff810e..d833e419d545 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -125,3 +125,111 @@ sidebar_label: php
                          • while
                          • xor
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index e8fcfaf8af32..e15091f87617 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -98,3 +98,111 @@ sidebar_label: powershell
                          • Where
                          • While
                          • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 71b97282c3bf..74cb62355be5 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -43,3 +43,111 @@ sidebar_label: protobuf-schema ## RESERVED WORDS
                              + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✗|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✓|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 3fa24defa317..bfc590021cb7 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -102,3 +102,111 @@ sidebar_label: python-aiohttp
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 6acfe0910078..a1400e199a90 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -102,3 +102,111 @@ sidebar_label: python-blueplanet
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 483060b622f4..870162d940cf 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -94,3 +94,111 @@ sidebar_label: python-experimental
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 1f76e4346687..59eb4d75a80b 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -102,3 +102,111 @@ sidebar_label: python-flask
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/python.md b/docs/generators/python.md index 19e268b90dd0..dc78e52ed0ce 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -92,3 +92,111 @@ sidebar_label: python
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/r.md b/docs/generators/r.md index 8d71a39a69e1..5e03a8a86fe0 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -55,3 +55,111 @@ sidebar_label: r
                            • true
                            • while
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 82d9f33bb343..94a9d1d37a76 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -90,3 +90,111 @@ sidebar_label: ruby-on-rails
                            • while
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index b759489632c0..b831c8b7182a 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -89,3 +89,111 @@ sidebar_label: ruby-sinatra
                            • while
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index f749fa96677a..63c7d3fc48ae 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -104,3 +104,111 @@ sidebar_label: ruby
                            • while
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 50551fa841cc..46f33f4cbb3f 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -96,3 +96,111 @@ sidebar_label: rust-server
                            • while
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✗|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 9dfff407df99..0fd4e880aa4b 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -111,3 +111,111 @@ sidebar_label: rust
                            • while
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 3ad7d16a08dc..9ffaf33e713a 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -104,3 +104,111 @@ sidebar_label: scala-akka
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✓|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 764ea5fd718a..24f1b8cbd94f 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -122,3 +122,111 @@ sidebar_label: scala-finch
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 33542992272d..072d887e01dc 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -114,3 +114,111 @@ sidebar_label: scala-gatling
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 4fa157bcd7ae..a42a703fd2ec 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -115,3 +115,111 @@ sidebar_label: scala-httpclient-deprecated
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index 0608d6cfa2d5..c43b6a82ec6d 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -115,3 +115,111 @@ sidebar_label: scala-lagom-server
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 48d5cc9d55ac..01eabec58499 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -114,3 +114,111 @@ sidebar_label: scala-play-server
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index f420e0519960..16c58bd9976b 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -116,3 +116,111 @@ sidebar_label: scalatra
                            • volatile
                            • while
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index e6050ab3f19a..a5c62a788fba 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -115,3 +115,111 @@ sidebar_label: scalaz
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 7ba4dca43d0d..600e22289664 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -181,3 +181,111 @@ sidebar_label: spring
                            • volatile
                            • while
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✓|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✓|OAS2,OAS3 diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 776a950d6979..8686174b4cc5 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -152,3 +152,111 @@ sidebar_label: swift2-deprecated
                            • while
                            • willSet
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md index d605fb9d7674..a9fadef38383 100644 --- a/docs/generators/swift3-deprecated.md +++ b/docs/generators/swift3-deprecated.md @@ -146,3 +146,111 @@ sidebar_label: swift3-deprecated
                            • where
                            • while
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index dfd34277fcc6..5e7bd630a810 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -204,3 +204,111 @@ sidebar_label: swift4
                            • while
                            • willSet
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index b5295c907585..9ca15a3f202e 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -203,3 +203,111 @@ sidebar_label: swift5
                            • while
                            • willSet
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 13c700448a0d..654963adc7f9 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -137,3 +137,111 @@ sidebar_label: typescript-angular
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index ac3aaf63d600..2fcbf81476e5 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -120,3 +120,111 @@ sidebar_label: typescript-angularjs
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 7f934105a894..e12293e9562d 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -123,3 +123,111 @@ sidebar_label: typescript-aurelia
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index f34971518b6f..961fa500dd39 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -127,3 +127,111 @@ sidebar_label: typescript-axios
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 695c85c033e5..933dce1f1416 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -153,3 +153,111 @@ sidebar_label: typescript-fetch
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 62170b6117cf..e4daf3bb9e8d 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -130,3 +130,111 @@ sidebar_label: typescript-inversify
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 8a00cf0d97be..3f28481c3e28 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -125,3 +125,111 @@ sidebar_label: typescript-jquery
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 7baeb9240142..54eee1ac863a 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -128,3 +128,111 @@ sidebar_label: typescript-node
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index e888c68f49f9..b46f0fafe589 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -149,3 +149,111 @@ sidebar_label: typescript-redux-query
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 41811e3d1ffb..7cbfaf702101 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -141,3 +141,111 @@ sidebar_label: typescript-rxjs
                            • with
                            • yield
                            • + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✓|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✗|OAS2,OAS3 +|ApiKey|✗|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✗|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/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 8e55421c7bdd..da7e69eeeff4 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 @@ -24,15 +24,15 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConfigLoader; import org.openapitools.codegen.GeneratorNotFoundException; +import org.openapitools.codegen.meta.FeatureSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; -import java.util.Locale; -import java.util.Map; -import java.util.TreeMap; +import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -78,6 +78,9 @@ public class ConfigHelp implements Runnable { @Option(name = {"--instantiation-types"}, title = "instantiation types", description = "displays types used to instantiate simple type/alias names") private Boolean instantiationTypes; + @Option(name = {"--feature-set"}, title = "feature set", description = "displays feature set as supported by the generator") + private Boolean featureSets; + @Option(name = { "--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).") private Boolean markdownHeader; @@ -99,6 +102,7 @@ public void run() { reservedWords = Boolean.TRUE; languageSpecificPrimitives = Boolean.TRUE; importMappings = Boolean.TRUE; + featureSets = Boolean.TRUE; } try { @@ -199,17 +203,12 @@ private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { sb.append("|"); // default - sb.append(escapeHtml4(langCliOption.getDefault())).append("|"); - - sb.append(newline); + sb.append(escapeHtml4(langCliOption.getDefault())).append("|").append(newline); }); if (Boolean.TRUE.equals(importMappings)) { - sb.append(newline); - sb.append("## IMPORT MAPPING"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("## IMPORT MAPPING").append(newline).append(newline); sb.append("| Type/Alias | Imports |").append(newline); sb.append("| ---------- | ------- |").append(newline); @@ -227,10 +226,7 @@ private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { } if (Boolean.TRUE.equals(instantiationTypes)) { - sb.append(newline); - sb.append("## INSTANTIATION TYPES"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("## INSTANTIATION TYPES").append(newline).append(newline); sb.append("| Type/Alias | Instantiated By |").append(newline); sb.append("| ---------- | --------------- |").append(newline); @@ -248,31 +244,51 @@ private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { } if (Boolean.TRUE.equals(languageSpecificPrimitives)) { - sb.append(newline); - sb.append("## LANGUAGE PRIMITIVES"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("## LANGUAGE PRIMITIVES").append(newline).append(newline); + sb.append("
                                "); config.languageSpecificPrimitives() .stream() .sorted(String::compareTo) .forEach(s -> sb.append("
                              • ").append(escapeHtml4(s)).append("
                              • ").append(newline)); - sb.append("
                              "); - sb.append(newline); + sb.append("").append(newline); } if (Boolean.TRUE.equals(reservedWords)) { - sb.append(newline); - sb.append("## RESERVED WORDS"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("## RESERVED WORDS").append(newline).append(newline); + sb.append("
                                "); config.reservedWords() .stream() .sorted(String::compareTo) .forEach(s -> sb.append("
                              • ").append(escapeHtml4(s)).append("
                              • ").append(newline)); - sb.append("
                              "); - sb.append(newline); + sb.append("").append(newline); + } + + if (Boolean.TRUE.equals(featureSets)) { + sb.append(newline).append("## FEATURE SET").append(newline).append(newline); + + List flattened = config.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); + }); } } @@ -305,14 +321,12 @@ private void generateYamlSample(StringBuilder sb, CodegenConfig config) { } private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) { - sb.append(newline); - sb.append("CONFIG OPTIONS"); + sb.append(newline).append("CONFIG OPTIONS"); if (Boolean.TRUE.equals(namedHeader)) { sb.append(" for ").append(generatorName).append(newline); } - sb.append(newline); - sb.append(newline); + sb.append(newline).append(newline); String optIndent = "\t"; String optNestedIndent = "\t "; @@ -324,19 +338,14 @@ private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) { }, TreeMap::new)); langCliOptions.forEach((key, langCliOption) -> { - sb.append(optIndent).append(key); - sb.append(newline); + sb.append(optIndent).append(key).append(newline); sb.append(optNestedIndent).append(langCliOption.getOptionHelp() .replaceAll("\n", System.lineSeparator() + optNestedIndent)); - sb.append(newline); - sb.append(newline); + sb.append(newline).append(newline); }); if (Boolean.TRUE.equals(importMappings)) { - sb.append(newline); - sb.append("IMPORT MAPPING"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("IMPORT MAPPING").append(newline).append(newline); Map map = config.importMapping() .entrySet() .stream() @@ -348,10 +357,7 @@ private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) { } if (Boolean.TRUE.equals(instantiationTypes)) { - sb.append(newline); - sb.append("INSTANTIATION TYPES"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("INSTANTIATION TYPES").append(newline).append(newline); Map map = config.instantiationTypes() .entrySet() .stream() @@ -363,24 +369,53 @@ private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) { } if (Boolean.TRUE.equals(languageSpecificPrimitives)) { - sb.append(newline); - sb.append("LANGUAGE PRIMITIVES"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("LANGUAGE PRIMITIVES").append(newline).append(newline); String[] arr = config.languageSpecificPrimitives().stream().sorted().toArray(String[]::new); writePlainTextFromArray(sb, arr, optIndent); sb.append(newline); } if (Boolean.TRUE.equals(reservedWords)) { - sb.append(newline); - sb.append("RESERVED WORDS"); - sb.append(newline); - sb.append(newline); + sb.append(newline).append("RESERVED WORDS").append(newline).append(newline); String[] arr = config.reservedWords().stream().sorted().toArray(String[]::new); writePlainTextFromArray(sb, arr, optIndent); sb.append(newline); } + + if (Boolean.TRUE.equals(featureSets)) { + sb.append(newline).append("FEATURE SET").append(newline); + + List flattened = config.getFeatureSet().flatten(); + flattened.sort(Comparator.comparing(FeatureSet.FeatureSetFlattened::getFeatureCategory)); + + AtomicReference lastCategory = new AtomicReference<>(); + + String nameKey = "Name"; + String supportedKey = "Supported"; + String definedByKey = "Defined By"; + int maxNameLength = flattened.stream().map(FeatureSet.FeatureSetFlattened::getFeatureName).mapToInt(String::length).max().orElse(nameKey.length()); + int maxSupportedLength = supportedKey.length(); + int definedInLength = 20; + String format = "%-" + maxNameLength + "s\t%-" + maxSupportedLength + "s\t%-" + definedInLength + "s"; + + flattened.forEach(featureSet -> { + if (!featureSet.getFeatureCategory().equals(lastCategory.get())) { + lastCategory.set(featureSet.getFeatureCategory()); + sb.append(newline).append(newline).append(" ").append(featureSet.getFeatureCategory()).append(":"); + sb.append(newline).append(newline); + sb.append(optIndent).append(String.format(Locale.ROOT, format, nameKey, supportedKey, definedByKey)).append(newline); + sb.append(optIndent).append(String.format(Locale.ROOT, format, + StringUtils.repeat("-", maxNameLength), + StringUtils.repeat("-", maxSupportedLength), + StringUtils.repeat("-", definedInLength))); + } + + String mark = featureSet.isSupported() ? "✓" : "x"; + String centeredMark = StringUtils.center(mark, maxSupportedLength); + String definedByCsv = StringUtils.join(featureSet.getSource(), ","); + sb.append(newline).append(optIndent).append(String.format(Locale.ROOT, format, featureSet.getFeatureName(), centeredMark, definedByCsv)); + }); + } } private void writePlainTextFromMap( diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java index 3d93eefd936c..3ff23a51a392 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java @@ -16,10 +16,12 @@ package org.openapitools.codegen.meta; +import com.google.common.collect.ImmutableList; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.meta.features.annotations.AnnotationType; -import java.util.Arrays; -import java.util.EnumSet; +import java.lang.annotation.Annotation; +import java.util.*; import java.util.stream.Collectors; /** @@ -178,6 +180,167 @@ public EnumSet getWireFormatFeatures() { } } + /** + * Displays a flattened or "normalized" view of the featureSet. This is for simplifying user-facing display only. + */ + public static class FeatureSetFlattened { + String featureCategory; + String featureName; + boolean isSupported; + + List source = new ArrayList<>(3); + + public String getFeatureCategory() { + return featureCategory; + } + + public String getFeatureName() { + return featureName; + } + + public boolean isSupported() { + return isSupported; + } + + public List getSource() { + return ImmutableList.copyOf(source); + } + } + + public List flatten() { + // TODO: Look at making this method function more generically. + List states = new ArrayList<>(); + EnumSet.allOf(ClientModificationFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = ClientModificationFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.clientModificationFeatures.contains(feat); + + try { + for (Annotation an : ClientModificationFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + states.add(state); + }); + EnumSet.allOf(DataTypeFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = DataTypeFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.dataTypeFeatures.contains(feat); + + try { + for (Annotation an : DataTypeFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + EnumSet.allOf(DocumentationFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = DocumentationFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.documentationFeatures.contains(feat); + + try { + for (Annotation an : DocumentationFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + EnumSet.allOf(SchemaSupportFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = SchemaSupportFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.schemaSupportFeatures.contains(feat); + + try { + for (Annotation an : SchemaSupportFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + EnumSet.allOf(GlobalFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = GlobalFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.globalFeatures.contains(feat); + + try { + for (Annotation an : GlobalFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + EnumSet.allOf(ParameterFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = ParameterFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.parameterFeatures.contains(feat); + + try { + for (Annotation an : ParameterFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + EnumSet.allOf(SecurityFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = SecurityFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.securityFeatures.contains(feat); + + try { + for (Annotation an : SecurityFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + EnumSet.allOf(WireFormatFeature.class).forEach(feat -> { + FeatureSetFlattened state = new FeatureSetFlattened(); + state.featureCategory = WireFormatFeature.class.getSimpleName(); + state.featureName = feat.name(); + state.isSupported = this.wireFormatFeatures.contains(feat); + + try { + for (Annotation an : WireFormatFeature.class.getField(feat.name()).getAnnotations()) { + state.source.add(AnnotationType.fromAnnotation(an.annotationType())); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + + states.add(state); + }); + + return states; + } + /** * {@code FeatureSet} builder static inner class. */ diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/AnnotationType.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/AnnotationType.java new file mode 100644 index 000000000000..82e3886d6be3 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/AnnotationType.java @@ -0,0 +1,12 @@ +package org.openapitools.codegen.meta.features.annotations; + +public enum AnnotationType { + OAS2, OAS3, ToolingExtension; + + public static AnnotationType fromAnnotation(Class input) { + if(input == OAS2.class) return AnnotationType.OAS2; + if(input == OAS3.class) return AnnotationType.OAS3; + if(input == ToolingExtension.class) return AnnotationType.ToolingExtension; + return null; + } +} diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/meta/FeatureSetTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/meta/FeatureSetTest.java new file mode 100644 index 000000000000..7378903d4717 --- /dev/null +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/meta/FeatureSetTest.java @@ -0,0 +1,136 @@ +package org.openapitools.codegen.meta; + +import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.meta.features.annotations.AnnotationType; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static org.testng.Assert.*; + +public class FeatureSetTest { + + @Test + public void flattOnUnspecified() { + List flattened = FeatureSet.UNSPECIFIED.flatten(); + // There are 73 features at the time of writing this test. This makes sure we get a "Full" flat representation. + int knownFeatureCount = 73; + int checkedCount = 0; + assertTrue(flattened.size() >= knownFeatureCount); + + for (FeatureSet.FeatureSetFlattened f : flattened) { + checkedCount += 1; + assertFalse(f.isSupported); + } + + assertTrue(checkedCount >= knownFeatureCount); + } + + @Test + public void flattenOnMultipleFeatures() { + FeatureSet featureSet = FeatureSet.newBuilder() + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .includeDataTypeFeatures(DataTypeFeature.Int32, DataTypeFeature.Array) + .includeGlobalFeatures(GlobalFeature.Consumes, GlobalFeature.Examples) + .includeParameterFeatures(ParameterFeature.Body, ParameterFeature.Query) + .includeSecurityFeatures(SecurityFeature.BearerToken, SecurityFeature.BasicAuth, SecurityFeature.OAuth2_Implicit) + .includeDocumentationFeatures(DocumentationFeature.Model) + .includeSchemaSupportFeatures(SchemaSupportFeature.Composite) + .build(); + + List flattened = featureSet.flatten(); + List supported = new ArrayList<>(); + flattened.forEach(f -> { + if (f.isSupported) { + supported.add(f); + } + }); + + // note that the order of these checks is deterministic, but unrelated to feature inclusion order in this test. + assertEquals(supported.size(), 12); + + Set toolingOnly = new HashSet() {{ + add(AnnotationType.ToolingExtension); + }}; + Set oas2Only = new HashSet() {{ + add(AnnotationType.OAS2); + }}; + Set oas3Only = new HashSet() {{ + add(AnnotationType.OAS3); + }}; + Set bothSpecs = new HashSet() {{ + add(AnnotationType.OAS2); + add(AnnotationType.OAS3); + }}; + + assertEquals(supported.get(0).featureCategory, ClientModificationFeature.class.getSimpleName()); + assertEquals(supported.get(0).featureName, ClientModificationFeature.BasePath.name()); + assertEquals(new HashSet<>(supported.get(0).source), toolingOnly); + + assertEquals(supported.get(1).featureCategory, DataTypeFeature.class.getSimpleName()); + assertEquals(supported.get(1).featureName, DataTypeFeature.Int32.name()); + assertEquals(new HashSet<>(supported.get(1).source), bothSpecs); + + assertEquals(supported.get(2).featureCategory, DataTypeFeature.class.getSimpleName()); + assertEquals(supported.get(2).featureName, DataTypeFeature.Array.name()); + assertEquals(new HashSet<>(supported.get(2).source), bothSpecs); + + assertEquals(supported.get(3).featureCategory, DocumentationFeature.class.getSimpleName()); + assertEquals(supported.get(3).featureName, DocumentationFeature.Model.name()); + assertEquals(new HashSet<>(supported.get(3).source), toolingOnly); + + assertEquals(supported.get(4).featureCategory, SchemaSupportFeature.class.getSimpleName()); + assertEquals(supported.get(4).featureName, SchemaSupportFeature.Composite.name()); + assertEquals(new HashSet<>(supported.get(4).source), bothSpecs); + + assertEquals(supported.get(5).featureCategory, GlobalFeature.class.getSimpleName()); + assertEquals(supported.get(5).featureName, GlobalFeature.Consumes.name()); + assertEquals(new HashSet<>(supported.get(5).source), oas2Only); + + assertEquals(supported.get(6).featureCategory, GlobalFeature.class.getSimpleName()); + assertEquals(supported.get(6).featureName, GlobalFeature.Examples.name()); + assertEquals(new HashSet<>(supported.get(6).source), bothSpecs); + + assertEquals(supported.get(7).featureCategory, ParameterFeature.class.getSimpleName()); + assertEquals(supported.get(7).featureName, ParameterFeature.Query.name()); + assertEquals(new HashSet<>(supported.get(7).source), bothSpecs); + + assertEquals(supported.get(8).featureCategory, ParameterFeature.class.getSimpleName()); + assertEquals(supported.get(8).featureName, ParameterFeature.Body.name()); + assertEquals(new HashSet<>(supported.get(8).source), oas2Only); + + assertEquals(supported.get(9).featureCategory, SecurityFeature.class.getSimpleName()); + assertEquals(supported.get(9).featureName, SecurityFeature.BasicAuth.name()); + assertEquals(new HashSet<>(supported.get(9).source), bothSpecs); + + assertEquals(supported.get(10).featureCategory, SecurityFeature.class.getSimpleName()); + assertEquals(supported.get(10).featureName, SecurityFeature.BearerToken.name()); + assertEquals(new HashSet<>(supported.get(10).source), oas3Only); + + assertEquals(supported.get(11).featureCategory, SecurityFeature.class.getSimpleName()); + assertEquals(supported.get(11).featureName, SecurityFeature.OAuth2_Implicit.name()); + assertEquals(new HashSet<>(supported.get(11).source), bothSpecs); + } + + @Test + public void flattenOnSingleFeatures() { + FeatureSet featureSet = FeatureSet.newBuilder().includeClientModificationFeatures(ClientModificationFeature.BasePath).build(); + List flattened = featureSet.flatten(); + List supported = new ArrayList<>(); + flattened.forEach(f -> { + if (f.isSupported) { + supported.add(f); + } + }); + + assertEquals(supported.size(), 1); + assertEquals(supported.get(0).featureCategory, ClientModificationFeature.class.getSimpleName()); + assertEquals(supported.get(0).featureName, ClientModificationFeature.BasePath.name()); + assertEquals(new HashSet<>(supported.get(0).source), new HashSet() {{ + add(AnnotationType.ToolingExtension); + }}); + } +} \ No newline at end of file From 26c9c64634d30b9003da0758c230d5393607d89e Mon Sep 17 00:00:00 2001 From: Matt Traynham Date: Sat, 1 Feb 2020 22:12:11 -0500 Subject: [PATCH 44/72] [kotlin][client] Add inheritance to Kotlin Client templates (#4453) * Add inheritance to Kotlin Client templates * Correct white spacing issues * Rebuild kotlin client samples --- .../languages/AbstractKotlinCodegen.java | 4 ++++ .../kotlin-client/data_class.mustache | 19 ++++++++++--------- .../kotlin-client/data_class_opt_var.mustache | 2 +- .../kotlin-client/data_class_req_var.mustache | 2 +- .../kotlin-client/interface_opt_var.mustache | 12 ++++++++++++ .../kotlin-client/interface_req_var.mustache | 12 ++++++++++++ .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 6 ++---- .../openapitools/client/models/Category.kt | 6 ++---- .../org/openapitools/client/models/Order.kt | 6 ++---- .../org/openapitools/client/models/Pet.kt | 6 ++---- .../org/openapitools/client/models/Tag.kt | 6 ++---- .../org/openapitools/client/models/User.kt | 6 ++---- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 6 ++---- .../openapitools/client/models/Category.kt | 6 ++---- .../org/openapitools/client/models/Order.kt | 6 ++---- .../org/openapitools/client/models/Pet.kt | 14 ++++++-------- .../org/openapitools/client/models/Tag.kt | 6 ++---- .../org/openapitools/client/models/User.kt | 6 ++---- .../openapitools/client/models/ApiResponse.kt | 4 +--- .../openapitools/client/models/Category.kt | 4 +--- .../org/openapitools/client/models/Order.kt | 4 +--- .../org/openapitools/client/models/Pet.kt | 4 +--- .../org/openapitools/client/models/Tag.kt | 4 +--- .../org/openapitools/client/models/User.kt | 4 +--- .../openapitools/client/models/ApiResponse.kt | 6 ++---- .../openapitools/client/models/Category.kt | 6 ++---- .../org/openapitools/client/models/Order.kt | 6 ++---- .../org/openapitools/client/models/Pet.kt | 6 ++---- .../org/openapitools/client/models/Tag.kt | 6 ++---- .../org/openapitools/client/models/User.kt | 6 ++---- 72 files changed, 128 insertions(+), 231 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache create mode 100644 modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache 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 0c935ed9ff39..40e9f2e68b53 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 @@ -335,6 +335,10 @@ public Map postProcessModels(Map objs) { for (Object _mo : models) { Map mo = (Map) _mo; CodegenModel cm = (CodegenModel) mo.get("model"); + if (cm.getDiscriminator() != null) { + cm.vendorExtensions.put("x-has-data-class-body", true); + break; + } for (CodegenProperty var : cm.vars) { if (var.isEnum || isSerializableModel()) { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index 47d2d5e9d288..fc43540f4e47 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -31,21 +31,22 @@ import java.io.Serializable @Parcelize {{/parcelizeModels}} {{#multiplatform}}@Serializable{{/multiplatform}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}} -{{#nonPublicApi}}internal {{/nonPublicApi}}data class {{classname}} ( -{{#vars}} -{{#required}}{{>data_class_req_var}}{{/required}}{{^required}}{{>data_class_opt_var}}{{/required}}{{^-last}},{{/-last}} -{{/vars}} -) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}} -{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}} -{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}} -{{#vendorExtensions.x-has-data-class-body}} -{ +{{#nonPublicApi}}internal {{/nonPublicApi}}{{#discriminator}}interface{{/discriminator}}{{^discriminator}}data class{{/discriminator}} {{classname}}{{^discriminator}} ( +{{#requiredVars}} +{{>data_class_req_var}}{{^-last}}, +{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, +{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}}, +{{/-last}}{{/optionalVars}} +){{/discriminator}}{{#parent}}{{^serializableModel}}{{^parcelizeModels}} : {{parent}}{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{^parcelizeModels}} : {{parent}}, Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{^serializableModel}}{{#parcelizeModels}} : {{parent}}, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{#parcelizeModels}} : {{parent}}, 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}}{{#requiredVars}} +{{>interface_req_var}}{{/requiredVars}}{{#optionalVars}} +{{>interface_opt_var}}{{/optionalVars}}{{/discriminator}} {{#hasEnums}} {{#vars}} {{#isEnum}} 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 3a8d2871db67..f8c93c5fdd57 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 @@ -9,4 +9,4 @@ @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") {{/gson}} {{/multiplatform}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/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 ca645e26c854..9fdca570a595 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 @@ -9,4 +9,4 @@ @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") {{/gson}} {{/multiplatform}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ 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 new file mode 100644 index 000000000000..fa8f1c310c29 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache @@ -0,0 +1,12 @@ +{{#description}} + /* {{{description}}} */ +{{/description}} + {{^multiplatform}} + {{#moshi}} + @Json(name = "{{{vendorExtensions.x-base-name-literal}}}") + {{/moshi}} + {{#gson}} + @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") + {{/gson}} + {{/multiplatform}} + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/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 new file mode 100644 index 000000000000..ca645e26c854 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache @@ -0,0 +1,12 @@ +{{#description}} + /* {{{description}}} */ +{{/description}} + {{^multiplatform}} + {{#moshi}} + @Json(name = "{{{vendorExtensions.x-base-name-literal}}}") + {{/moshi}} + {{#gson}} + @SerializedName("{{{vendorExtensions.x-base-name-literal}}}") + {{/gson}} + {{/multiplatform}} + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 96b24b0b2b28..51a090c496e9 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -27,7 +27,5 @@ data class ApiResponse ( val type: kotlin.String? = null, @SerializedName("message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt index d0af4fb050bb..0e978e11fd6d 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -24,7 +24,5 @@ data class Category ( val id: kotlin.Long? = null, @SerializedName("name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt index 5a33789128b2..ae3a28a775e2 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -37,10 +37,8 @@ data class Order ( val status: Order.Status? = null, @SerializedName("complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt index 9a500cc7037c..4a5187302bdb 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -39,10 +39,8 @@ data class Pet ( /* pet status in the store */ @SerializedName("status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt index 484f3db87cd6..71d9cb767be7 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -24,7 +24,5 @@ data class Tag ( val id: kotlin.Long? = null, @SerializedName("name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt index 4a660298d733..c2158935c59d 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt @@ -43,7 +43,5 @@ data class User ( /* User Status */ @SerializedName("userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 47766821f186..ada15fee7a1b 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -27,7 +27,5 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt index edb16cc1270a..426a0e515928 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -24,7 +24,5 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt index 6bf55feb4ea6..3cfa5ca96263 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -37,10 +37,8 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt index ad4623a4ad12..a94bb811c3b4 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -39,10 +39,8 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt index 05dc7c9afefe..f9ef87e13fbf 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -24,7 +24,5 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt index 537b01d3c278..dfd63806da94 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt @@ -43,7 +43,5 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 7db8d675141f..25f8ffdf4731 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -28,7 +28,5 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt index e7a69536f8e7..e7229ac4384f 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -25,7 +25,5 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt index dd01d68e3f0b..c408adac9951 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -38,10 +38,8 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt index d139610db01d..abba68a06462 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -40,10 +40,8 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt index 3fd7bf14b7eb..c1da1f74c35c 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -25,7 +25,5 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt index f91f96df6ac0..3d9ab2208497 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt @@ -44,7 +44,5 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt index 3f05f17779e7..51ab6ed93980 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -25,7 +25,5 @@ data class ApiResponse ( @SerialName(value = "code") val code: kotlin.Int? = null, @SerialName(value = "type") val type: kotlin.String? = null, @SerialName(value = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt index eff7d12a4abd..96432c658ada 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt @@ -23,7 +23,5 @@ import kotlinx.serialization.internal.CommonEnumSerializer data class Category ( @SerialName(value = "id") val id: kotlin.Long? = null, @SerialName(value = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index e6cdd21a006d..ec1a0d28e317 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -32,10 +32,8 @@ data class Order ( /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, @SerialName(value = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt index 583826a79a19..5e33d0056708 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt @@ -34,10 +34,8 @@ data class Pet ( @SerialName(value = "tags") val tags: kotlin.Array? = null, /* pet status in the store */ @SerialName(value = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt index 6c5ce642e78e..b21e51bf8d3b 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt @@ -23,7 +23,5 @@ import kotlinx.serialization.internal.CommonEnumSerializer data class Tag ( @SerialName(value = "id") val id: kotlin.Long? = null, @SerialName(value = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt index dd092dfd7074..7d52e737d49e 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt @@ -36,7 +36,5 @@ data class User ( @SerialName(value = "phone") val phone: kotlin.String? = null, /* User Status */ @SerialName(value = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index a5bb44489147..4a2f8b137ccc 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -27,7 +27,5 @@ internal data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt index 70ed6b25e578..10d567d3c3cd 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -24,7 +24,5 @@ internal data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt index fcec740e09e7..8a44803771b2 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -37,10 +37,8 @@ internal data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt index aedb57e436dd..fe63282fa215 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -39,10 +39,8 @@ internal data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt index 0c36f402fda2..2a130c6cd1d8 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -24,7 +24,5 @@ internal data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt index 2070fe6d80b5..afac563f29c4 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt @@ -43,7 +43,5 @@ internal data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 8d5c8448f049..eed5027e8017 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -28,12 +28,10 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt index 7895d7627ab1..f29e68330576 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -25,12 +25,10 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt index 452a176c120b..2b92b4375d14 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -38,13 +38,11 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt index eb78e6d71405..bb0a5df6e198 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -40,13 +40,11 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt index 7fb743571254..aa93e4356956 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -25,12 +25,10 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt index e66f3cf09fed..7487ed927d1b 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt @@ -44,12 +44,10 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 47766821f186..ada15fee7a1b 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -27,7 +27,5 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt index edb16cc1270a..426a0e515928 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -24,7 +24,5 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt index 6bf55feb4ea6..3cfa5ca96263 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -37,10 +37,8 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt index ad4623a4ad12..a94bb811c3b4 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -39,10 +39,8 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt index 05dc7c9afefe..f9ef87e13fbf 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -24,7 +24,5 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt index 537b01d3c278..dfd63806da94 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt @@ -43,7 +43,5 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 47766821f186..ada15fee7a1b 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -27,7 +27,5 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt index edb16cc1270a..426a0e515928 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -24,7 +24,5 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt index 6bf55feb4ea6..3cfa5ca96263 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -37,10 +37,8 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt index ad4623a4ad12..a94bb811c3b4 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -39,10 +39,8 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt index 05dc7c9afefe..f9ef87e13fbf 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -24,7 +24,5 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt index 537b01d3c278..dfd63806da94 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt @@ -43,7 +43,5 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 8d5c8448f049..eed5027e8017 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -28,12 +28,10 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt index 7895d7627ab1..f29e68330576 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -25,12 +25,10 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt index cb75cf72b895..847b3ff5e288 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -38,13 +38,11 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt index c6a47fdc0c48..f978ea477eaf 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -27,26 +27,24 @@ import java.io.Serializable */ data class Pet ( - @Json(name = "id") - val id: kotlin.Long? = null, - @Json(name = "category") - val category: Category? = null, @Json(name = "name") val name: kotlin.String, @Json(name = "photoUrls") val photoUrls: kotlin.Array, + @Json(name = "id") + val id: kotlin.Long? = null, + @Json(name = "category") + val category: Category? = null, @Json(name = "tags") val tags: kotlin.Array? = null, /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt index 7fb743571254..aa93e4356956 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -25,12 +25,10 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt index e66f3cf09fed..7487ed927d1b 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt @@ -44,12 +44,10 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 47766821f186..ada15fee7a1b 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -27,7 +27,5 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt index edb16cc1270a..426a0e515928 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -24,7 +24,5 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt index cb25060ae820..8f947e96651f 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -37,10 +37,8 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) +) { - -{ /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt index ad4623a4ad12..a94bb811c3b4 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -39,10 +39,8 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) +) { - -{ /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt index 05dc7c9afefe..f9ef87e13fbf 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -24,7 +24,5 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) - - +) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt index 537b01d3c278..dfd63806da94 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt @@ -43,7 +43,5 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) - - +) diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 8d5c8448f049..eed5027e8017 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -28,12 +28,10 @@ data class ApiResponse ( val type: kotlin.String? = null, @Json(name = "message") val message: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt index 7895d7627ab1..f29e68330576 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -25,12 +25,10 @@ data class Category ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt index 452a176c120b..2b92b4375d14 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -38,13 +38,11 @@ data class Order ( val status: Order.Status? = null, @Json(name = "complete") val complete: kotlin.Boolean? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + /** * Order Status * Values: placed,approved,delivered diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt index eb78e6d71405..bb0a5df6e198 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -40,13 +40,11 @@ data class Pet ( /* pet status in the store */ @Json(name = "status") val status: Pet.Status? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + /** * pet status in the store * Values: available,pending,sold diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt index 7fb743571254..aa93e4356956 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -25,12 +25,10 @@ data class Tag ( val id: kotlin.Long? = null, @Json(name = "name") val name: kotlin.String? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt index e66f3cf09fed..7487ed927d1b 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt @@ -44,12 +44,10 @@ data class User ( /* User Status */ @Json(name = "userStatus") val userStatus: kotlin.Int? = null -) -: Serializable - -{ +) : Serializable { companion object { private const val serialVersionUID: Long = 123 } + } From f356de606b367aee34aac57da34108827aa6b139 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Mon, 3 Feb 2020 01:15:33 +0900 Subject: [PATCH 45/72] [csharp-netcore] Improved `Multimap` and `ClientUtils` implementation (#5122) * Improvement Multimap impl * Fixed missing semi-colon * Fixed compile error using .NET Standard 2.0 * Fixed compile error using .NET Standard 2.0 * Update sample projects * Apply modifications to additional code flows --- .../csharp-netcore/ClientUtils.mustache | 69 ++---- .../csharp-netcore/Multimap.mustache | 129 ++++------ .../resources/csharp-netcore/api.mustache | 48 +--- .../src/Org.OpenAPITools/Api/FakeApi.cs | 224 +++--------------- .../Api/FakeClassnameTags123Api.cs | 16 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +-- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 +-- .../Org.OpenAPITools/Client/ClientUtils.cs | 69 ++---- .../src/Org.OpenAPITools/Client/Multimap.cs | 120 +++++----- .../src/Org.OpenAPITools/Api/FakeApi.cs | 224 +++--------------- .../Api/FakeClassnameTags123Api.cs | 16 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 32 +-- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 +-- .../Org.OpenAPITools/Client/ClientUtils.cs | 69 ++---- .../src/Org.OpenAPITools/Client/Multimap.cs | 120 +++++----- 15 files changed, 289 insertions(+), 943 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache index 4528441a5ab8..8601b2e9c34e 100755 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache @@ -2,13 +2,10 @@ using System; using System.Collections; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Net; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; {{#useCompareNetObjects}} using KellermanSoftware.CompareNetObjects; {{/useCompareNetObjects}} @@ -58,15 +55,11 @@ namespace {{packageName}}.Client { var parameters = new Multimap(); - if (IsCollection(value) && collectionFormat == "multi") + if (value is ICollection collection && collectionFormat == "multi") { - var valueCollection = value as IEnumerable; - if (valueCollection != null) + foreach (var item in collection) { - foreach (var item in valueCollection) - { - parameters.Add(name, ParameterToString(item)); - } + parameters.Add(name, ParameterToString(item)); } } else @@ -87,49 +80,26 @@ namespace {{packageName}}.Client /// Formatted string. public static string ParameterToString(object obj, IReadableConfiguration configuration = null) { - if (obj is DateTime) + 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)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - else if (obj is DateTimeOffset) + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + 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)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else - { - if (obj is IList) - { - var list = obj as IList; - var flattenedString = new StringBuilder(); - foreach (var param in list) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - - return Convert.ToString (obj); - } - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is ICollection collection) + return string.Join(",", collection.Cast()); + + return Convert.ToString(obj); } - + /// /// URL encode a string /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 @@ -172,7 +142,7 @@ namespace {{packageName}}.Client /// Encoded string. public static string Base64Encode(string text) { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -182,14 +152,9 @@ namespace {{packageName}}.Client /// Byte array public static byte[] ReadAsBytes(Stream inputStream) { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) + using (var ms = new MemoryStream()) { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } + inputStream.CopyTo(ms); return ms.ToArray(); } } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/Multimap.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/Multimap.mustache index 7e8c97a83248..8624af009244 100755 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/Multimap.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/Multimap.mustache @@ -2,7 +2,6 @@ using System; using System.Collections; -{{^net35}}using System.Collections.Concurrent;{{/net35}} using System.Collections.Generic; namespace {{packageName}}.Client @@ -10,13 +9,13 @@ namespace {{packageName}}.Client /// /// A dictionary in which one key has many associated values. /// - /// The type of the key + /// The type of the key /// The type of the value associated with the key. - public class Multimap : IDictionary> + public class Multimap : IDictionary> { #region Private Fields - private readonly {{^net35}}Concurrent{{/net35}}Dictionary> _dictionary; + private readonly Dictionary> _dictionary; #endregion Private Fields @@ -27,16 +26,16 @@ namespace {{packageName}}.Client /// public Multimap() { - _dictionary = new {{^net35}}Concurrent{{/net35}}Dictionary>(); + _dictionary = new Dictionary>(); } /// /// Constructor with comparer. /// /// - public Multimap(IEqualityComparer comparer) + public Multimap(IEqualityComparer comparer) { - _dictionary = new {{^net35}}Concurrent{{/net35}}Dictionary>(comparer); + _dictionary = new Dictionary>(comparer); } #endregion Constructors @@ -47,7 +46,7 @@ namespace {{packageName}}.Client /// To get the enumerator. /// /// Enumerator - public IEnumerator>> GetEnumerator() + public IEnumerator>> GetEnumerator() { return _dictionary.GetEnumerator(); } @@ -68,12 +67,25 @@ namespace {{packageName}}.Client /// Add values to Multimap /// /// Key value pair - public void Add(KeyValuePair> item) + public void Add(KeyValuePair> item) { if (!TryAdd(item.Key, item.Value)) throw new InvalidOperationException("Could not add values to Multimap."); } + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + /// /// Clear Multimap /// @@ -88,7 +100,7 @@ namespace {{packageName}}.Client /// Key value pair /// Method needs to be implemented /// true if the Multimap contains the item; otherwise, false. - public bool Contains(KeyValuePair> item) + public bool Contains(KeyValuePair> item) { throw new NotImplementedException(); } @@ -101,7 +113,7 @@ namespace {{packageName}}.Client /// from Multimap. The array must have zero-based indexing. /// The zero-based index in array at which copying begins. /// Method needs to be implemented - public void CopyTo(KeyValuePair>[] array, int arrayIndex) + public void CopyTo(KeyValuePair>[] array, int arrayIndex) { throw new NotImplementedException(); } @@ -112,7 +124,7 @@ namespace {{packageName}}.Client /// Key value pair /// true if the item is successfully removed; otherwise, false. /// Method needs to be implemented - public bool Remove(KeyValuePair> item) + public bool Remove(KeyValuePair> item) { throw new NotImplementedException(); } @@ -120,24 +132,12 @@ namespace {{packageName}}.Client /// /// Gets the number of items contained in the Multimap. /// - public int Count - { - get - { - return _dictionary.Count; - } - } + public int Count => _dictionary.Count; /// /// Gets a value indicating whether the Multimap is read-only. /// - public bool IsReadOnly - { - get - { - return false; - } - } + public bool IsReadOnly => false; /// /// Adds an item with the provided key and value to the Multimap. @@ -145,12 +145,11 @@ namespace {{packageName}}.Client /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add the value to Multimap. - public void Add(T key, IList value) + public void Add(TKey key, IList value) { if (value != null && value.Count > 0) { - IList list; - if (_dictionary.TryGetValue(key, out list)) + if (_dictionary.TryGetValue(key, out var list)) { foreach (var k in value) list.Add(k); } @@ -169,7 +168,7 @@ namespace {{packageName}}.Client /// The key to locate in the Multimap. /// true if the Multimap contains an item with /// the key; otherwise, false. - public bool ContainsKey(T key) + public bool ContainsKey(TKey key) { return _dictionary.ContainsKey(key); } @@ -179,10 +178,9 @@ namespace {{packageName}}.Client /// /// The key to locate in the Multimap. /// true if the item is successfully removed; otherwise, false. - public bool Remove(T key) + public bool Remove(TKey key) { - IList list; - return TryRemove(key, out list); + return TryRemove(key, out var _); } /// @@ -194,7 +192,7 @@ namespace {{packageName}}.Client /// This parameter is passed uninitialized. /// true if the object that implements Multimap contains /// an item with the specified key; otherwise, false. - public bool TryGetValue(T key, out IList value) + public bool TryGetValue(TKey key, out IList value) { return _dictionary.TryGetValue(key, out value); } @@ -204,36 +202,21 @@ namespace {{packageName}}.Client /// /// The key of the item to get or set. /// The value of the specified key. - public IList this[T key] + public IList this[TKey key] { - get - { - return _dictionary[key]; - } - set { _dictionary[key] = value; } + get => _dictionary[key]; + set => _dictionary[key] = value; } /// /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. /// - public ICollection Keys - { - get - { - return _dictionary.Keys; - } - } + public ICollection Keys => _dictionary.Keys; /// /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. /// - public ICollection> Values - { - get - { - return _dictionary.Values; - } - } + public ICollection> Values => _dictionary.Values; /// /// Copy the items of the Multimap to an System.Array, @@ -244,7 +227,7 @@ namespace {{packageName}}.Client /// The zero-based index in array at which copying begins. public void CopyTo(Array array, int index) { - ((ICollection) _dictionary).CopyTo(array, index); + ((ICollection)_dictionary).CopyTo(array, index); } /// @@ -253,19 +236,17 @@ namespace {{packageName}}.Client /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add value to Multimap. - public void Add(T key, TValue value) + public void Add(TKey key, TValue value) { if (value != null) { - IList list; - if (_dictionary.TryGetValue(key, out list)) + if (_dictionary.TryGetValue(key, out var list)) { list.Add(value); } else { - list = new List(); - list.Add(value); + list = new List { value }; if (!TryAdd(key, list)) throw new InvalidOperationException("Could not add value to Multimap."); } @@ -279,45 +260,27 @@ namespace {{packageName}}.Client /** * Helper method to encapsulate generator differences between dictionary types. */ - private bool TryRemove(T key, out IList value) + private bool TryRemove(TKey key, out IList value) { - {{^net35}}return _dictionary.TryRemove(key, out value);{{/net35}} - {{#net35}}try - { - _dictionary.TryGetValue(key, out value); - _dictionary.Remove(key); - } -#pragma warning disable 168 - catch (ArgumentException e) -#pragma warning restore 168 - { - value = null; - return false; - } - - return true;{{/net35}} + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); } /** * Helper method to encapsulate generator differences between dictionary types. */ - private bool TryAdd(T key, IList value) + private bool TryAdd(TKey key, IList value) { - {{^net35}}return _dictionary.TryAdd(key, value);{{/net35}} - {{#net35}} try { _dictionary.Add(key, value); } -#pragma warning disable 168 - catch (ArgumentException e) -#pragma warning restore 168 + catch (ArgumentException) { return false; } return true; - {{/net35}} } #endregion Private Members } 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 e8a32d382a8e..f149f196b390 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -268,23 +268,11 @@ namespace {{packageName}}.{{apiPackage}} {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) { - foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); } {{/vendorExtensions.x-csharp-value-type}} {{#vendorExtensions.x-csharp-value-type}} - foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); {{/vendorExtensions.x-csharp-value-type}} {{/queryParams}} {{#headerParams}} @@ -333,13 +321,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isKeyInQuery}} if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); } {{/isKeyInQuery}} {{/isApiKey}} @@ -438,23 +420,11 @@ namespace {{packageName}}.{{apiPackage}} {{^vendorExtensions.x-csharp-value-type}} if ({{paramName}} != null) { - foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); } {{/vendorExtensions.x-csharp-value-type}} {{#vendorExtensions.x-csharp-value-type}} - foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); {{/vendorExtensions.x-csharp-value-type}} {{/queryParams}} {{#headerParams}} @@ -503,13 +473,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isKeyInQuery}} if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) { - foreach (var _kvp in {{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); } {{/isKeyInQuery}} {{/isApiKey}} 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 6c0797b7ffef..a4ab49f4424d 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 @@ -1567,13 +1567,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt if (query != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } localVarRequestOptions.Data = body; @@ -1639,13 +1633,7 @@ public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string qu if (query != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } localVarRequestOptions.Data = body; @@ -2110,43 +2098,19 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode if (enumQueryStringArray != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)); } if (enumQueryString != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); } if (enumQueryInteger != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); } if (enumQueryDouble != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); } if (enumHeaderStringArray != null) localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter @@ -2227,43 +2191,19 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode if (enumQueryStringArray != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)); } if (enumQueryString != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); } if (enumQueryInteger != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); } if (enumQueryDouble != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); } if (enumHeaderStringArray != null) localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter @@ -2336,39 +2276,15 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); if (stringGroup != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); } if (int64Group != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) @@ -2433,39 +2349,15 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); if (stringGroup != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); } if (int64Group != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) @@ -2797,53 +2689,23 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF if (pipe != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)); } if (ioutil != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)); } if (http != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)); } if (url != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); } if (context != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); } @@ -2925,53 +2787,23 @@ public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync if (pipe != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)); } if (ioutil != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)); } if (http != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)); } if (url != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); } if (context != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index ebf022334c8d..492bae795c49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -244,13 +244,7 @@ public Org.OpenAPITools.Client.ApiResponse< ModelClient > TestClassnameWithHttpI // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); } // make the HTTP request @@ -313,13 +307,7 @@ public async System.Threading.Tasks.Task TestClassnameAsync (ModelC // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); } // make the HTTP request 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 5c4a624d26a6..0fe84290ce2b 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 @@ -851,13 +851,7 @@ public Org.OpenAPITools.Client.ApiResponse< List > FindPetsByStatusWithHttp if (status != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); } // authentication (petstore_auth) required @@ -924,13 +918,7 @@ public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List< if (status != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); } // authentication (petstore_auth) required @@ -996,13 +984,7 @@ public Org.OpenAPITools.Client.ApiResponse< List > FindPetsByTagsWithHttpIn if (tags != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); } // authentication (petstore_auth) required @@ -1069,13 +1051,7 @@ public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List LoginUserWithHttpInfo (stri if (username != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); } if (password != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); } @@ -1183,23 +1171,11 @@ public async System.Threading.Tasks.Task LoginUserAsync (string username if (username != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); } if (password != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs index dde50ca71de2..764ea009ef93 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -11,13 +11,10 @@ using System; using System.Collections; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Net; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; using KellermanSoftware.CompareNetObjects; namespace Org.OpenAPITools.Client @@ -63,15 +60,11 @@ public static Multimap ParameterToMultiMap(string collectionForm { var parameters = new Multimap(); - if (IsCollection(value) && collectionFormat == "multi") + if (value is ICollection collection && collectionFormat == "multi") { - var valueCollection = value as IEnumerable; - if (valueCollection != null) + foreach (var item in collection) { - foreach (var item in valueCollection) - { - parameters.Add(name, ParameterToString(item)); - } + parameters.Add(name, ParameterToString(item)); } } else @@ -92,49 +85,26 @@ public static Multimap ParameterToMultiMap(string collectionForm /// Formatted string. public static string ParameterToString(object obj, IReadableConfiguration configuration = null) { - if (obj is DateTime) + 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)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - else if (obj is DateTimeOffset) + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + 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)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else - { - if (obj is IList) - { - var list = obj as IList; - var flattenedString = new StringBuilder(); - foreach (var param in list) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - - return Convert.ToString (obj); - } - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is ICollection collection) + return string.Join(",", collection.Cast()); + + return Convert.ToString(obj); } - + /// /// URL encode a string /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 @@ -177,7 +147,7 @@ public static string UrlEncode(string input) /// Encoded string. public static string Base64Encode(string text) { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -187,14 +157,9 @@ public static string Base64Encode(string text) /// Byte array public static byte[] ReadAsBytes(Stream inputStream) { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) + using (var ms = new MemoryStream()) { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } + inputStream.CopyTo(ms); return ms.ToArray(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Multimap.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Multimap.cs index 4bde7f7ffe48..b0449fb764dc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Multimap.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/Multimap.cs @@ -11,7 +11,6 @@ using System; using System.Collections; -using System.Collections.Concurrent; using System.Collections.Generic; namespace Org.OpenAPITools.Client @@ -19,13 +18,13 @@ namespace Org.OpenAPITools.Client /// /// A dictionary in which one key has many associated values. /// - /// The type of the key + /// The type of the key /// The type of the value associated with the key. - public class Multimap : IDictionary> + public class Multimap : IDictionary> { #region Private Fields - private readonly ConcurrentDictionary> _dictionary; + private readonly Dictionary> _dictionary; #endregion Private Fields @@ -36,16 +35,16 @@ public class Multimap : IDictionary> /// public Multimap() { - _dictionary = new ConcurrentDictionary>(); + _dictionary = new Dictionary>(); } /// /// Constructor with comparer. /// /// - public Multimap(IEqualityComparer comparer) + public Multimap(IEqualityComparer comparer) { - _dictionary = new ConcurrentDictionary>(comparer); + _dictionary = new Dictionary>(comparer); } #endregion Constructors @@ -56,7 +55,7 @@ public Multimap(IEqualityComparer comparer) /// To get the enumerator. /// /// Enumerator - public IEnumerator>> GetEnumerator() + public IEnumerator>> GetEnumerator() { return _dictionary.GetEnumerator(); } @@ -77,12 +76,25 @@ IEnumerator IEnumerable.GetEnumerator() /// Add values to Multimap /// /// Key value pair - public void Add(KeyValuePair> item) + public void Add(KeyValuePair> item) { if (!TryAdd(item.Key, item.Value)) throw new InvalidOperationException("Could not add values to Multimap."); } + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + /// /// Clear Multimap /// @@ -97,7 +109,7 @@ public void Clear() /// Key value pair /// Method needs to be implemented /// true if the Multimap contains the item; otherwise, false. - public bool Contains(KeyValuePair> item) + public bool Contains(KeyValuePair> item) { throw new NotImplementedException(); } @@ -110,7 +122,7 @@ public bool Contains(KeyValuePair> item) /// from Multimap. The array must have zero-based indexing. /// The zero-based index in array at which copying begins. /// Method needs to be implemented - public void CopyTo(KeyValuePair>[] array, int arrayIndex) + public void CopyTo(KeyValuePair>[] array, int arrayIndex) { throw new NotImplementedException(); } @@ -121,7 +133,7 @@ public void CopyTo(KeyValuePair>[] array, int arrayIndex) /// Key value pair /// true if the item is successfully removed; otherwise, false. /// Method needs to be implemented - public bool Remove(KeyValuePair> item) + public bool Remove(KeyValuePair> item) { throw new NotImplementedException(); } @@ -129,24 +141,12 @@ public bool Remove(KeyValuePair> item) /// /// Gets the number of items contained in the Multimap. /// - public int Count - { - get - { - return _dictionary.Count; - } - } + public int Count => _dictionary.Count; /// /// Gets a value indicating whether the Multimap is read-only. /// - public bool IsReadOnly - { - get - { - return false; - } - } + public bool IsReadOnly => false; /// /// Adds an item with the provided key and value to the Multimap. @@ -154,12 +154,11 @@ public bool IsReadOnly /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add the value to Multimap. - public void Add(T key, IList value) + public void Add(TKey key, IList value) { if (value != null && value.Count > 0) { - IList list; - if (_dictionary.TryGetValue(key, out list)) + if (_dictionary.TryGetValue(key, out var list)) { foreach (var k in value) list.Add(k); } @@ -178,7 +177,7 @@ public void Add(T key, IList value) /// The key to locate in the Multimap. /// true if the Multimap contains an item with /// the key; otherwise, false. - public bool ContainsKey(T key) + public bool ContainsKey(TKey key) { return _dictionary.ContainsKey(key); } @@ -188,10 +187,9 @@ public bool ContainsKey(T key) /// /// The key to locate in the Multimap. /// true if the item is successfully removed; otherwise, false. - public bool Remove(T key) + public bool Remove(TKey key) { - IList list; - return TryRemove(key, out list); + return TryRemove(key, out var _); } /// @@ -203,7 +201,7 @@ public bool Remove(T key) /// This parameter is passed uninitialized. /// true if the object that implements Multimap contains /// an item with the specified key; otherwise, false. - public bool TryGetValue(T key, out IList value) + public bool TryGetValue(TKey key, out IList value) { return _dictionary.TryGetValue(key, out value); } @@ -213,36 +211,21 @@ public bool TryGetValue(T key, out IList value) /// /// The key of the item to get or set. /// The value of the specified key. - public IList this[T key] + public IList this[TKey key] { - get - { - return _dictionary[key]; - } - set { _dictionary[key] = value; } + get => _dictionary[key]; + set => _dictionary[key] = value; } /// /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. /// - public ICollection Keys - { - get - { - return _dictionary.Keys; - } - } + public ICollection Keys => _dictionary.Keys; /// /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. /// - public ICollection> Values - { - get - { - return _dictionary.Values; - } - } + public ICollection> Values => _dictionary.Values; /// /// Copy the items of the Multimap to an System.Array, @@ -253,7 +236,7 @@ public ICollection> Values /// The zero-based index in array at which copying begins. public void CopyTo(Array array, int index) { - ((ICollection) _dictionary).CopyTo(array, index); + ((ICollection)_dictionary).CopyTo(array, index); } /// @@ -262,19 +245,17 @@ public void CopyTo(Array array, int index) /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add value to Multimap. - public void Add(T key, TValue value) + public void Add(TKey key, TValue value) { if (value != null) { - IList list; - if (_dictionary.TryGetValue(key, out list)) + if (_dictionary.TryGetValue(key, out var list)) { list.Add(value); } else { - list = new List(); - list.Add(value); + list = new List { value }; if (!TryAdd(key, list)) throw new InvalidOperationException("Could not add value to Multimap."); } @@ -288,18 +269,27 @@ public void Add(T key, TValue value) /** * Helper method to encapsulate generator differences between dictionary types. */ - private bool TryRemove(T key, out IList value) + private bool TryRemove(TKey key, out IList value) { - return _dictionary.TryRemove(key, out value); - + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); } /** * Helper method to encapsulate generator differences between dictionary types. */ - private bool TryAdd(T key, IList value) + private bool TryAdd(TKey key, IList value) { - return _dictionary.TryAdd(key, value); + try + { + _dictionary.Add(key, value); + } + catch (ArgumentException) + { + return false; + } + + return true; } #endregion Private Members } 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 6c0797b7ffef..a4ab49f4424d 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 @@ -1567,13 +1567,7 @@ public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHt if (query != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } localVarRequestOptions.Data = body; @@ -1639,13 +1633,7 @@ public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string qu if (query != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } localVarRequestOptions.Data = body; @@ -2110,43 +2098,19 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode if (enumQueryStringArray != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)); } if (enumQueryString != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); } if (enumQueryInteger != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); } if (enumQueryDouble != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); } if (enumHeaderStringArray != null) localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter @@ -2227,43 +2191,19 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode if (enumQueryStringArray != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "enum_query_string_array", enumQueryStringArray)); } if (enumQueryString != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); } if (enumQueryInteger != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); } if (enumQueryDouble != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); } if (enumHeaderStringArray != null) localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter @@ -2336,39 +2276,15 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); if (stringGroup != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); } if (int64Group != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) @@ -2433,39 +2349,15 @@ public async System.Threading.Tasks.Task TestClientModelAsync (Mode foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); if (stringGroup != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); } if (int64Group != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); } localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter if (booleanGroup != null) @@ -2797,53 +2689,23 @@ public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionF if (pipe != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)); } if (ioutil != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)); } if (http != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)); } if (url != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); } if (context != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); } @@ -2925,53 +2787,23 @@ public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync if (pipe != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "pipe", pipe)); } if (ioutil != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)); } if (http != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("space", "http", http)); } if (url != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); } if (context != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index ebf022334c8d..492bae795c49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -244,13 +244,7 @@ public Org.OpenAPITools.Client.ApiResponse< ModelClient > TestClassnameWithHttpI // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); } // make the HTTP request @@ -313,13 +307,7 @@ public async System.Threading.Tasks.Task TestClassnameAsync (ModelC // authentication (api_key_query) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); } // make the HTTP request 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 5c4a624d26a6..0fe84290ce2b 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 @@ -851,13 +851,7 @@ public Org.OpenAPITools.Client.ApiResponse< List > FindPetsByStatusWithHttp if (status != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); } // authentication (petstore_auth) required @@ -924,13 +918,7 @@ public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List< if (status != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); } // authentication (petstore_auth) required @@ -996,13 +984,7 @@ public Org.OpenAPITools.Client.ApiResponse< List > FindPetsByTagsWithHttpIn if (tags != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); } // authentication (petstore_auth) required @@ -1069,13 +1051,7 @@ public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List LoginUserWithHttpInfo (stri if (username != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); } if (password != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); } @@ -1183,23 +1171,11 @@ public async System.Threading.Tasks.Task LoginUserAsync (string username if (username != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "username", username)); } if (password != null) { - foreach (var _kvp in Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)) - { - foreach (var _kvpValue in _kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "password", password)); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs index dde50ca71de2..764ea009ef93 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -11,13 +11,10 @@ using System; using System.Collections; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Net; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; using KellermanSoftware.CompareNetObjects; namespace Org.OpenAPITools.Client @@ -63,15 +60,11 @@ public static Multimap ParameterToMultiMap(string collectionForm { var parameters = new Multimap(); - if (IsCollection(value) && collectionFormat == "multi") + if (value is ICollection collection && collectionFormat == "multi") { - var valueCollection = value as IEnumerable; - if (valueCollection != null) + foreach (var item in collection) { - foreach (var item in valueCollection) - { - parameters.Add(name, ParameterToString(item)); - } + parameters.Add(name, ParameterToString(item)); } } else @@ -92,49 +85,26 @@ public static Multimap ParameterToMultiMap(string collectionForm /// Formatted string. public static string ParameterToString(object obj, IReadableConfiguration configuration = null) { - if (obj is DateTime) + 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)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - else if (obj is DateTimeOffset) + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + 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)obj).ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else - { - if (obj is IList) - { - var list = obj as IList; - var flattenedString = new StringBuilder(); - foreach (var param in list) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - - return Convert.ToString (obj); - } - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is ICollection collection) + return string.Join(",", collection.Cast()); + + return Convert.ToString(obj); } - + /// /// URL encode a string /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 @@ -177,7 +147,7 @@ public static string UrlEncode(string input) /// Encoded string. public static string Base64Encode(string text) { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -187,14 +157,9 @@ public static string Base64Encode(string text) /// Byte array public static byte[] ReadAsBytes(Stream inputStream) { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) + using (var ms = new MemoryStream()) { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } + inputStream.CopyTo(ms); return ms.ToArray(); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Multimap.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Multimap.cs index 4bde7f7ffe48..b0449fb764dc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Multimap.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/Multimap.cs @@ -11,7 +11,6 @@ using System; using System.Collections; -using System.Collections.Concurrent; using System.Collections.Generic; namespace Org.OpenAPITools.Client @@ -19,13 +18,13 @@ namespace Org.OpenAPITools.Client /// /// A dictionary in which one key has many associated values. /// - /// The type of the key + /// The type of the key /// The type of the value associated with the key. - public class Multimap : IDictionary> + public class Multimap : IDictionary> { #region Private Fields - private readonly ConcurrentDictionary> _dictionary; + private readonly Dictionary> _dictionary; #endregion Private Fields @@ -36,16 +35,16 @@ public class Multimap : IDictionary> /// public Multimap() { - _dictionary = new ConcurrentDictionary>(); + _dictionary = new Dictionary>(); } /// /// Constructor with comparer. /// /// - public Multimap(IEqualityComparer comparer) + public Multimap(IEqualityComparer comparer) { - _dictionary = new ConcurrentDictionary>(comparer); + _dictionary = new Dictionary>(comparer); } #endregion Constructors @@ -56,7 +55,7 @@ public Multimap(IEqualityComparer comparer) /// To get the enumerator. /// /// Enumerator - public IEnumerator>> GetEnumerator() + public IEnumerator>> GetEnumerator() { return _dictionary.GetEnumerator(); } @@ -77,12 +76,25 @@ IEnumerator IEnumerable.GetEnumerator() /// Add values to Multimap /// /// Key value pair - public void Add(KeyValuePair> item) + public void Add(KeyValuePair> item) { if (!TryAdd(item.Key, item.Value)) throw new InvalidOperationException("Could not add values to Multimap."); } + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + /// /// Clear Multimap /// @@ -97,7 +109,7 @@ public void Clear() /// Key value pair /// Method needs to be implemented /// true if the Multimap contains the item; otherwise, false. - public bool Contains(KeyValuePair> item) + public bool Contains(KeyValuePair> item) { throw new NotImplementedException(); } @@ -110,7 +122,7 @@ public bool Contains(KeyValuePair> item) /// from Multimap. The array must have zero-based indexing. /// The zero-based index in array at which copying begins. /// Method needs to be implemented - public void CopyTo(KeyValuePair>[] array, int arrayIndex) + public void CopyTo(KeyValuePair>[] array, int arrayIndex) { throw new NotImplementedException(); } @@ -121,7 +133,7 @@ public void CopyTo(KeyValuePair>[] array, int arrayIndex) /// Key value pair /// true if the item is successfully removed; otherwise, false. /// Method needs to be implemented - public bool Remove(KeyValuePair> item) + public bool Remove(KeyValuePair> item) { throw new NotImplementedException(); } @@ -129,24 +141,12 @@ public bool Remove(KeyValuePair> item) /// /// Gets the number of items contained in the Multimap. /// - public int Count - { - get - { - return _dictionary.Count; - } - } + public int Count => _dictionary.Count; /// /// Gets a value indicating whether the Multimap is read-only. /// - public bool IsReadOnly - { - get - { - return false; - } - } + public bool IsReadOnly => false; /// /// Adds an item with the provided key and value to the Multimap. @@ -154,12 +154,11 @@ public bool IsReadOnly /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add the value to Multimap. - public void Add(T key, IList value) + public void Add(TKey key, IList value) { if (value != null && value.Count > 0) { - IList list; - if (_dictionary.TryGetValue(key, out list)) + if (_dictionary.TryGetValue(key, out var list)) { foreach (var k in value) list.Add(k); } @@ -178,7 +177,7 @@ public void Add(T key, IList value) /// The key to locate in the Multimap. /// true if the Multimap contains an item with /// the key; otherwise, false. - public bool ContainsKey(T key) + public bool ContainsKey(TKey key) { return _dictionary.ContainsKey(key); } @@ -188,10 +187,9 @@ public bool ContainsKey(T key) /// /// The key to locate in the Multimap. /// true if the item is successfully removed; otherwise, false. - public bool Remove(T key) + public bool Remove(TKey key) { - IList list; - return TryRemove(key, out list); + return TryRemove(key, out var _); } /// @@ -203,7 +201,7 @@ public bool Remove(T key) /// This parameter is passed uninitialized. /// true if the object that implements Multimap contains /// an item with the specified key; otherwise, false. - public bool TryGetValue(T key, out IList value) + public bool TryGetValue(TKey key, out IList value) { return _dictionary.TryGetValue(key, out value); } @@ -213,36 +211,21 @@ public bool TryGetValue(T key, out IList value) /// /// The key of the item to get or set. /// The value of the specified key. - public IList this[T key] + public IList this[TKey key] { - get - { - return _dictionary[key]; - } - set { _dictionary[key] = value; } + get => _dictionary[key]; + set => _dictionary[key] = value; } /// /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. /// - public ICollection Keys - { - get - { - return _dictionary.Keys; - } - } + public ICollection Keys => _dictionary.Keys; /// /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. /// - public ICollection> Values - { - get - { - return _dictionary.Values; - } - } + public ICollection> Values => _dictionary.Values; /// /// Copy the items of the Multimap to an System.Array, @@ -253,7 +236,7 @@ public ICollection> Values /// The zero-based index in array at which copying begins. public void CopyTo(Array array, int index) { - ((ICollection) _dictionary).CopyTo(array, index); + ((ICollection)_dictionary).CopyTo(array, index); } /// @@ -262,19 +245,17 @@ public void CopyTo(Array array, int index) /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add value to Multimap. - public void Add(T key, TValue value) + public void Add(TKey key, TValue value) { if (value != null) { - IList list; - if (_dictionary.TryGetValue(key, out list)) + if (_dictionary.TryGetValue(key, out var list)) { list.Add(value); } else { - list = new List(); - list.Add(value); + list = new List { value }; if (!TryAdd(key, list)) throw new InvalidOperationException("Could not add value to Multimap."); } @@ -288,18 +269,27 @@ public void Add(T key, TValue value) /** * Helper method to encapsulate generator differences between dictionary types. */ - private bool TryRemove(T key, out IList value) + private bool TryRemove(TKey key, out IList value) { - return _dictionary.TryRemove(key, out value); - + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); } /** * Helper method to encapsulate generator differences between dictionary types. */ - private bool TryAdd(T key, IList value) + private bool TryAdd(TKey key, IList value) { - return _dictionary.TryAdd(key, value); + try + { + _dictionary.Add(key, value); + } + catch (ArgumentException) + { + return false; + } + + return true; } #endregion Private Members } From 9e32d435700e3ae3afba8c09a73c99f52c58795f Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sun, 2 Feb 2020 12:34:49 -0800 Subject: [PATCH 46/72] =?UTF-8?q?[bug]=20fix=20null=20pointer=20exception?= =?UTF-8?q?=20while=20evaluating=20recommend=E2=80=A6=20(#5191)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codegen/validations/oas/OpenApiEvaluator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java index e28a69b4386b..9132c7d0e224 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiEvaluator.java @@ -87,7 +87,10 @@ public ValidationResult validate(OpenAPI specification) { } } - parameters.forEach(parameter -> validationResult.consume(parameterValidations.validate(parameter))); + parameters.forEach(parameter -> { + parameter = ModelUtils.getReferencedParameter(specification, parameter); + validationResult.consume(parameterValidations.validate(parameter)); + }); return validationResult; } From 97ff9b4be7877c6d9b54a40331a3c1d2db164733 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 2 Feb 2020 17:36:53 -0500 Subject: [PATCH 47/72] [cli] Optional colorized outputs (#5193) --- modules/openapi-generator-cli/pom.xml | 15 ++++ .../src/main/resources/logback.xml | 84 +++++++++++++++++-- 2 files changed, 92 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index e1bd36543a92..d4304fd6ac10 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -65,6 +65,16 @@ + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + @@ -134,6 +144,11 @@ logback-classic 1.2.3 + + org.codehaus.janino + janino + 3.1.0 + org.testng testng diff --git a/modules/openapi-generator-cli/src/main/resources/logback.xml b/modules/openapi-generator-cli/src/main/resources/logback.xml index 62800526bdd2..efa74345a0fe 100644 --- a/modules/openapi-generator-cli/src/main/resources/logback.xml +++ b/modules/openapi-generator-cli/src/main/resources/logback.xml @@ -1,9 +1,20 @@ + + + + + + + + + System.out - [%thread] %-5level %logger{36} - %msg%n + ${noColorPattern} ERROR @@ -14,21 +25,80 @@ System.err - [%thread] %-5level %logger{36} - %msg%n + ${noColorPattern} ERROR + + System.out + true + + ${colorPattern} + + + ERROR + DENY + NEUTRAL + + + + System.err + true + + ${colorPattern} + + + ERROR + + + + System.err + true + + ONCE + + + [%thread] %highlight(%-5level) %logger{36} - %red(%msg)%n + + + - - + + + + + + + + + + + - - + + + + + + + + + + + - + + + + + + + + + From 7d366ad6ac61e3bdffc44e4a84669d5e83f5f22e Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Mon, 3 Feb 2020 03:08:51 -0500 Subject: [PATCH 48/72] [docs] Slack block, formatting, 'color' CLI option (#5194) Adds a more prominent Slack block on the main doc site in response to a few users not setting the Slack chat links on the Readme or in the "Learn how" block. Fixes a rendering issue in the "Try via NPM" block. Adds a one-liner about the recently added `-Dcolor` option for optionally colorizing output in the CLI. --- docs/usage.md | 4 +- website/i18n/en.json | 50 ++++++++---------- website/pages/en/index.js | 36 +++++++++++-- website/static/css/custom.css | 3 +- .../img/tools/Slack_Mark-256x256-3a29a6b.png | Bin 0 -> 5888 bytes 5 files changed, 60 insertions(+), 33 deletions(-) create mode 100644 website/static/img/tools/Slack_Mark-256x256-3a29a6b.png diff --git a/docs/usage.md b/docs/usage.md index d7fd3092b1de..64277c796605 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -230,7 +230,7 @@ An example bash completion script can be found in the repo at [scripts/openapi-g ## generate -The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The options are abbreviated below, but you may expand the full descriptions. +The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The abbreviated options are below, but you may expand the full descriptions. ```bash @@ -444,6 +444,8 @@ At a minimum, `generate` requires: * `-o` to specify a meaningful output directory (defaults to the current directory!) * `-i` to specify the input OpenAPI document +> **NOTE** You may also pass `-Dcolor` as a system property to colorize terminal outputs. + ### Examples The following examples use [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml). diff --git a/website/i18n/en.json b/website/i18n/en.json index 523607df864d..890f1a9d4493 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -123,9 +123,6 @@ "title": "Config Options for csharp-netcore", "sidebar_label": "csharp-netcore" }, - "generators/csharp-refactor": { - "title": "generators/csharp-refactor" - }, "generators/csharp": { "title": "Config Options for csharp", "sidebar_label": "csharp" @@ -186,9 +183,6 @@ "title": "Config Options for fsharp-giraffe-server", "sidebar_label": "fsharp-giraffe-server" }, - "generators/fsharp-giraffe": { - "title": "generators/fsharp-giraffe" - }, "generators/go-experimental": { "title": "Config Options for go-experimental", "sidebar_label": "go-experimental" @@ -213,16 +207,10 @@ "title": "Config Options for graphql-schema", "sidebar_label": "graphql-schema" }, - "generators/graphql-server": { - "title": "generators/graphql-server" - }, "generators/groovy": { "title": "Config Options for groovy", "sidebar_label": "groovy" }, - "generators/grpc-schema": { - "title": "generators/grpc-schema" - }, "generators/haskell-http-client": { "title": "Config Options for haskell-http-client", "sidebar_label": "haskell-http-client" @@ -259,6 +247,10 @@ "title": "Config Options for java-undertow-server", "sidebar_label": "java-undertow-server" }, + "generators/java-vertx-web": { + "title": "Config Options for java-vertx-web", + "sidebar_label": "java-vertx-web" + }, "generators/java-vertx": { "title": "Config Options for java-vertx", "sidebar_label": "java-vertx" @@ -335,6 +327,10 @@ "title": "Config Options for lua", "sidebar_label": "lua" }, + "generators/markdown": { + "title": "Config Options for markdown", + "sidebar_label": "markdown" + }, "generators/mysql-schema": { "title": "Config Options for mysql-schema", "sidebar_label": "mysql-schema" @@ -351,16 +347,10 @@ "title": "Config Options for nodejs-server-deprecated", "sidebar_label": "nodejs-server-deprecated" }, - "generators/nodejs-server": { - "title": "generators/nodejs-server" - }, "generators/objc": { "title": "Config Options for objc", "sidebar_label": "objc" }, - "generators/ocaml-client": { - "title": "generators/ocaml-client" - }, "generators/ocaml": { "title": "Config Options for ocaml", "sidebar_label": "ocaml" @@ -389,9 +379,13 @@ "title": "Config Options for php-silex", "sidebar_label": "php-silex" }, - "generators/php-slim": { - "title": "Config Options for php-slim", - "sidebar_label": "php-slim" + "generators/php-slim-deprecated": { + "title": "Config Options for php-slim-deprecated", + "sidebar_label": "php-slim-deprecated" + }, + "generators/php-slim4": { + "title": "Config Options for php-slim4", + "sidebar_label": "php-slim4" }, "generators/php-symfony": { "title": "Config Options for php-symfony", @@ -476,16 +470,10 @@ "title": "Config Options for scala-httpclient-deprecated", "sidebar_label": "scala-httpclient-deprecated" }, - "generators/scala-httpclient": { - "title": "generators/scala-httpclient" - }, "generators/scala-lagom-server": { "title": "Config Options for scala-lagom-server", "sidebar_label": "scala-lagom-server" }, - "generators/scala-play-framework": { - "title": "generators/scala-play-framework" - }, "generators/scala-play-server": { "title": "Config Options for scala-play-server", "sidebar_label": "scala-play-server" @@ -514,6 +502,10 @@ "title": "Config Options for swift4", "sidebar_label": "swift4" }, + "generators/swift5": { + "title": "Config Options for swift5", + "sidebar_label": "swift5" + }, "generators/typescript-angular": { "title": "Config Options for typescript-angular", "sidebar_label": "typescript-angular" @@ -546,6 +538,10 @@ "title": "Config Options for typescript-node", "sidebar_label": "typescript-node" }, + "generators/typescript-redux-query": { + "title": "Config Options for typescript-redux-query", + "sidebar_label": "typescript-redux-query" + }, "generators/typescript-rxjs": { "title": "Config Options for typescript-rxjs", "sidebar_label": "typescript-rxjs" diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 155ebb7b84ac..b0d927751f68 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -125,6 +125,28 @@ class Index extends React.Component { ); + const connectContents = stripMargin` + | **Connect** with us on Slack! + | + | We're a very community-oriented project. We have an active community of users, contributors, and core team members on Slack. Slack is often a good + | place to start if you're looking for guidance about where to begin contributing, if you have an idea you're + | not sure fits the project, or if you just want to ask a question or say hello. + | + | Slack is free to [download](https://slack.com/downloads), and our workspace is free to [sign up](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM). + `; + const ConnectOnSlack = () => ( + + {[ + { + content: `${connectContents}`, + image: `${baseUrl}img/tools/Slack_Mark-256x256-3a29a6b.png`, + imageAlign: 'left', + title: 'Active Community', + }, + ]} + + ); + const tryHomebrewContents = stripMargin` | **Install** via [homebrew](https://brew.sh/): | @@ -162,6 +184,8 @@ class Index extends React.Component { | -g go \\ | -o /local/out/go | \`\`\` + | + | For a full list of our docker images, check out [u/openapitools](https://hub.docker.com/u/openapitools) on Docker Hub. `; const TryOutDocker = () => ( @@ -179,7 +203,9 @@ class Index extends React.Component { const tryNpmContents = stripMargin` | The [NPM package wrapper](https://github.com/openapitools/openapi-generator-cli) is cross-platform wrapper around the .jar artifact. | **Install** globally, exposing the CLI on the command line: + | | + | | \`\`\`bash | # install the latest version of "openapi-generator-cli" | npm install @openapitools/openapi-generator-cli -g @@ -190,7 +216,8 @@ class Index extends React.Component { | # Or install it as dev-dependency in your node.js projects | npm install @openapitools/openapi-generator-cli -D | \`\`\` - | + | + | | | Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc: | \`\`\`bash @@ -229,17 +256,17 @@ class Index extends React.Component { {[ { - content: 'OpenAPI Generator supports many different integrations and use cases, including (but not limited to):\n\n' + + content: 'OpenAPI Generator supports many different integrations and use cases, including (but not limited to):\n' + '* Maven Plugin\n' + '* Gradle Plugin\n' + + '* Bazel Plugin\n' + '* CLI via Homebrew\n' + '* CLI via Docker\n' + '* CLI via npm\n' + '* Generator SaaS\n\n' + 'For details, see [Workflow Integrations](' + this.docUrl('integrations.html', this.props.language) + ')\n\n' + 'Generation also allows for easy customization via options, custom templates, or even custom generators on your classpath. ' + - 'See [Customization](' + this.docUrl('customization.html', this.props.language) + ') for details.\n\n' + - 'As a very community-oriented project, the core team is also active on the project\'s [Slack Workspace](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM).', + 'See [Customization](' + this.docUrl('customization.html', this.props.language) + ') for details.', image: `${baseUrl}img/color-logo.svg`, imageAlign: 'right', title: 'Learn How', @@ -358,6 +385,7 @@ class Index extends React.Component { {/**/} + diff --git a/website/static/css/custom.css b/website/static/css/custom.css index a0cef22cea85..2fcf0896ecfc 100755 --- a/website/static/css/custom.css +++ b/website/static/css/custom.css @@ -64,7 +64,8 @@ dd { #try .blockImage, #tryHomebrew .blockImage, -#tryDocker .blockImage { +#tryDocker .blockImage, +#connectOnSlack .blockImage { margin-top: auto; margin-bottom: auto; } diff --git a/website/static/img/tools/Slack_Mark-256x256-3a29a6b.png b/website/static/img/tools/Slack_Mark-256x256-3a29a6b.png new file mode 100644 index 0000000000000000000000000000000000000000..188ebb90ee056a0cabdd8afd83812df7045e4eba GIT binary patch literal 5888 zcmaht2{e>#+s_PR8Dkq`Y-351WiT>o>`R2QlctcF@fKRCFeIL_uY>YtQuZ=!YNTZf z8SChyD5d(^FcBq7DukKu@xFcEf6o7Z=lti)edd0y``Yg7zVB>``Y|^;`hka^?uOa zQiVOc!Gw+r!!1uW*#2#*s+QX|{<=1Lqom;y>{9Yl9j>0<2vWAH!yxtVzW}fp@ zGG_nCHSD`6_q!Kb>qTbRa_ooyd8>)uWl_j=?A)bVs9H{^!y zVnhM z@S{OAI#8NI3ToFqa&_>wX^4{ilf9S;#a8^tZ92%nQ4l)t^B-;vHm4RP&zUrfu?9becQVZ zD5=7Z7r%KX#j7V2KCgZrRqhER!Mq5CeQr+3(pF%eqV+mMseI@W2F#;WBxt%C3X@u2 zQY!AhTEkpi*Jp8%fbXiDYLXZ~r)^b##t={@^gpNmfrP2%ShFIGF04^*XGLrd4}?G& zUWEQY>ou%}lj`6%4BVIbn9y%KyrxK>FMt8OK8Rlg3;^>B@aPJ770?-ve^a4d{+6;E&v14y&bm;1)A{x7w4iwga?2;+g8wQZe```8$a4!J8f+e%lM zp=g|5qr5rk=d@)it6vb}*|GI(j6TSn=WluN-AUS;=eoGg$TvswV_081F-ekLi#t_3YXcww5pH>u zfJ>W?7MpHgz1-=!qN*ZrDXH<<{lYTA)Kg>GbNP}scqV!ywpy-<@@(JZSLrW(bEH+( zlTa8CxA&JQ>*g?y_M&LGNb96$96Yy+ig(Z5=DLx4Az!`DeDR;M{b>VA+3G)voMWljojYxu=Ayp{l8jb%!AtWz8r{NFOj(g+Cqw3yeIFAd;2YlvZ>RIXQ+_Y z_ju{}$*8V?MU=nsLwM1nUI*3qa7lb`+=zL;)VI-3BiHCkSoK?4VQ%-L#T{Y8;e}lm z99(c}ZE@-Qv6LgnQ^huGX;7=z&rmo0d~_Hxz5VpA1{@Zx(Kc9gP-(KcWsBku&cJC+ zuFfjOa2hEo*GFb{26S)JR(a(UvP-;=Z^&D(4RiB(M5nzG<`a2bKdRcREZ zd+6C^SE$K@@M!xoiehnRpq~BbMv-6Qd+mgoaN0O@Cr>0P^&ca5J|7({4;5;$WY6@R zgo&j=6ue5G;W)C(W2Zt91{83V^^0HT%2=QQL={d0@=eP8ugOa?vjorP2B}kGYZ5H* zqgqaF4w6;4JA}Dz?+aQXkXFJeUwoEph~_rYao|R3PJA+Bg$GGZk~Ja7hpdi_nRUWh z^azBUyTjU)v5w&Xid&|)7&|UAR zYV;{RCb3Nb3(9D{RgVvJF?shPe?gk56!p@+d#rsESrORV2#T6#^BrVb0HmdF&TqtdL1yLS;38;DqK%n zuR@~g+1D|-%9p|xkxz$hV~Yt849S)#sZ#*`i9B129Wa2?l^}X^>JQCK_M+g%P=~FB z7X-Uu0+_XR2JaX!%K*N2pjiw0evZs{6xZoJ)U_c_=(6f0k`)QQW zw@8Au(WsaW+z!rNcNpeAoXnzs^1#$7g3h*b^Nuq559HZEpm23T;+XprMob-HO zl;%xITS=K}O;-L9q+`?li5Y*jtOE|VnR@t=j|n9Y@P%7Bxk zc0}NAz_{8?lc?9R z4gI%8C8F`D z;L`rehiXV3;Qi60h`~w?qFuVPx?fwt9@d43NCZKFVi38=5Qj+ZZYNCg-_Q+p}Y5X z%=A8})y}NNjES7LRf~7{rl%T&EKaL3q`AuTv+6@ta_2c#GVix4!zTU|$T+C-1=fAt zwCm2Yo2eG+9Jw8{yZSn_c z)u-^@2KI49km+X29*H1Bak8bvWqk!t*}(Ol)ZSl547$eX@B;UCe|?k7ZMGrVV#Pf# zy0mkm$QePZAPWJu9tBK!x>M;0y_^GYvtm|kPT_S`L;+kCjo3+xI^}BwS=&&OZE=0a zL+v_>3Ca;A#``d+B$#u?YAq2d5^}P0V-Di+)mr+y8?gZdgTelTg;Jhx8cMP9ngewzdt?W#!(6)Yjxf9f>m~nt!;u9$J zPNx|+XkvByYl)Jjt>XP{&K{>1EhR1`4lh&XP}xU;Mf$s0u_-WP;5dnxS1R%i751?5 zl24u-K1s!%CLky)yXh)e+D=v0rB5sKRJ63m+kzYKvMkg1pJIw2cS3$E#^e7&4Ylc3 z!QWY|91x*cF8?r1(oP7qnhkR?!B4}61*pz5oa|SOn~>KDdwFfOcxRqj+}MuYD!frG z&@w4pPCMd&c%_6%2URWcy-3be_u#r;$$@~WYaV<+_+ivNutRskRJhuNpfAmvYw8yd zrS@9e%y!IT*O>RGpd8X%1MQed0wC~}hhnluhj6gE5_OObRyBLRmtDPxKjcM}MN$SK_< zj(GClmaP+=nONMDvc}cTqEF1HhEUKOmd%GE?{+<$C*ej8g6JVxYo z+UzjDXaexVjWOUl!Sd)%mfI7L^*}^N=Z@f*Q~?;0r{@V%4P$O&x$TFd4w6OxV$Fvo zV1~S5B-zJ=!WHFr0V@wgt-Q|QM$Ih22C@xe_zj^S@6?Kc56JI;f@$fy)+F|M_-p_x zVu(tIY5?XB!rV|If8-S$QnN2Lp$>M*Fd61621Vtr)!ss`KVU?yc%2Uw2L$AK>S+Df zCr$SN#>N4Q48RtENN@}Jr?Jq&mo&T$BW z0(9@YEC*PR#TKhN;G!~UPev&nHHpSC)d>9;*uX_iFsUyy=bjNROK^zTVcQ^E86R2+ zA4m|tk(EOlE}H_w|zXG?@zC(p5W-4wHZ^|O`(mj>Yk@m|Qj z8564`ZLP?0M$m;Z@)|mt4(PwXpSW-|tvgu5*NZwt`hL0 zM`G{;P(pNS&epSeP6`?4u)?Pr<7=)qMGq*0&vm2M?V+L*f@9vMSg+U-G_Zd0I@Q1* zdVtsuSEu)^G_CSbu+~@U=_g^AX@(&X%H)YR%je;*bg>;i!}X%YPIIy&+YwAdKuy-s z$5tv&&x3Yg{mj(VB>Fo)jH)=N^E38}4{Rb)JhuUZwfeT@`^;xo)wD5A(Mg!({SwGR z3XC&Pfjrc1hR^iZeI&z=Hzlw0Nc>ysP^HAk<7nzv@5(##_WhB^Lcu(Vq~s?rbM6J{ zpO-cxbXKJ>!`r7ok4Q@jx_^1zzePbhpTCXlj+YmHGX@M@DB3H)OuOER%{1qZnSY=s z_vYFrDIaY=Hnkf!nOX@i+9Up81b;otBNE^C^l;@;S~ISTl^4pvzhRstbgl{5dQEgH zN-OKD1sz#Wcyun5j#|Gd)+tdyyPmqw34N5J`=ANs19M-#hG5r7oQ=JOEUk*qG<%fZ z%ybjGM?EEBCNv7Egvtn{W0hhLpS*%AAUxvAa%HOPO1yOXLPD2VdxcxrIW zstm3`mqM%NN^`YuQU~`+I>lAX<(X@;X_Pl#%uGFlPdP5zNSyLbRfa4<%_Jl>-pIf)Eqjt+e z*){Vq2j@YvIXmK%Br8dum2wJzGIh*t3gSqcfsd9lqyoGsRsAia;{sHA#>fERpCs*N zYp6b@VSy@Xc^Vf|MCS+$nAPpJT7#+r6a+J_tPbcT0K5aPjsd`^IzX{vp7;%FR2_ws z%BBL~$$@u}!V0~>6i<&Gg@i&E(99HD6Jw47qFdJZ-i48K($?x;2ts(hhW!S>Z!2C~ zItzQn2>*>tc>MR0ZGrO|BfOYz0qySzM~VNJuByOr(i-HD7~#d=xNpbS)Hn=G$CnLx z07iDQyvu+2BTB`U6MsRViJJ!!X5eJkXJJuZ7mEh9+iV-L9sW{0!u5=ValZGUwKUI_ z(BI6gf!ZADf45BbZ2X_*3e13K%W{hwabZW5i&u%?Ar!tH_s5lv1+m;d`+g?Yp8>wN z%@cfX)BM$8EHH?*5j!IA9<)*pCqFWfWP+Jno;WT8=i|Y&mg^EgQM`@r@*ech=52U| z$SZPHEnxttc3pBhQGjMg8A?=b8RzNNDDs<71-&P5>QqH@m6r0lONtCdsQNzkn5&+H zlF(sX8$ik2-=I24Gy$b>1+pB4YcAEjv)sT8t~{2e@go?#UA3N|^@F4E%Tj`iFX*)d z3fr77!<0gb25(zxH(QbvEjdN*G*gND_`)4`wa0a&Wpeg-UKNE#wIl4jf*VDmk1?`z)cQ=Z8puVc3Wz3o ziW7wzzB0Y1v9?Sz-4W+o-SY1>7vb3bOPZs_iG)A`}xZCqBBB(rP%WtqhUp)nWN5#rK)377kbj_~4u&jpIOtP1Zz zXKX6GL|}w>lr5u%mUM1z&e(o|AvCS|LNA_01=0-f>Pmm9+5eof?#4DNccHi_nZE3Vu|3gH`+oIe|1YYpFF6_j%1f;pPOPeEmJ_BoOY)EeHj c>8l8+x(^b literal 0 HcmV?d00001 From a6807a73e5650bf73f54ab910756d61640a0ebff Mon Sep 17 00:00:00 2001 From: "Yutaka.Miyamae" <48900426+yutaka0m@users.noreply.github.com> Date: Mon, 3 Feb 2020 17:17:26 +0900 Subject: [PATCH 49/72] [Kotlin]Formatted according to the kotlin style guide (#5196) * Do not put a space https://kotlinlang.org/docs/reference/coding-conventions.html#horizontal-whitespace * Use 4 spaces for indentation https://kotlinlang.org/docs/reference/coding-conventions.html#formatting * Put spaces around the `=` sign https://kotlinlang.org/docs/reference/coding-conventions.html#method-call-formatting * Indent the expression body by 4 spaces https://kotlinlang.org/docs/reference/coding-conventions.html#expression-body-formatting * run ./bin/kotlin-springboot-petstore-all.sh --- .../kotlin-spring/dataClass.mustache | 2 +- .../kotlin-spring/dataClassOptVar.mustache | 8 ++--- .../kotlin-spring/dataClassReqVar.mustache | 6 ++-- .../kotlin-spring/exceptions.mustache | 6 ++-- .../.openapi-generator/VERSION | 2 +- .../kotlin/org/openapitools/model/Category.kt | 10 +++--- .../org/openapitools/model/InlineObject.kt | 10 +++--- .../org/openapitools/model/InlineObject1.kt | 10 +++--- .../openapitools/model/ModelApiResponse.kt | 14 ++++---- .../kotlin/org/openapitools/model/Order.kt | 26 +++++++------- .../main/kotlin/org/openapitools/model/Pet.kt | 34 +++++++++---------- .../main/kotlin/org/openapitools/model/Tag.kt | 10 +++--- .../kotlin/org/openapitools/model/User.kt | 34 +++++++++---------- .../.openapi-generator/VERSION | 2 +- .../kotlin/org/openapitools/api/Exceptions.kt | 6 ++-- .../kotlin/org/openapitools/model/Category.kt | 10 +++--- .../org/openapitools/model/InlineObject.kt | 10 +++--- .../org/openapitools/model/InlineObject1.kt | 10 +++--- .../openapitools/model/ModelApiResponse.kt | 14 ++++---- .../kotlin/org/openapitools/model/Order.kt | 26 +++++++------- .../main/kotlin/org/openapitools/model/Pet.kt | 34 +++++++++---------- .../main/kotlin/org/openapitools/model/Tag.kt | 10 +++--- .../kotlin/org/openapitools/model/User.kt | 34 +++++++++---------- 23 files changed, 164 insertions(+), 164 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 607daa0f8deb..a06f6689bba4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -5,7 +5,7 @@ {{/vars}} */{{#discriminator}} {{>typeInfoAnnotation}}{{/discriminator}} -{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}data class {{classname}} ( +{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}data class {{classname}}( {{#requiredVars}} {{>dataClassReqVar}}{{^-last}}, {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, 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 0f5001411af8..dd139bd63bb0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,5 +1,5 @@ {{#useBeanValidation}}{{#required}} - {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} - @Deprecated(message=""){{/deprecated}} - @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} + @Deprecated(message = ""){{/deprecated}} + @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/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 0fbccc8975fe..2b2682033c1a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{#required}} - {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/isReadOnly}} \ No newline at end of file + {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} + @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/isReadOnly}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache index d85b8396fa5f..5ccfb771530b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache @@ -17,13 +17,13 @@ class DefaultExceptionHandler { @ExceptionHandler(value = [ApiException::class]) fun onApiException(ex: ApiException, response: HttpServletResponse): Unit = - response.sendError(ex.code, ex.message) + response.sendError(ex.code, ex.message) @ExceptionHandler(value = [NotImplementedError::class]) fun onNotImplemented(ex: NotImplementedError, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) + response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) @ExceptionHandler(value = [ConstraintViolationException::class]) fun onConstraintViolation(ex: ConstraintViolationException, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) + response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index e4955748d3e7..bfbf77eb7fad 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index 4be27d19748b..54ee92921f28 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Category ( +data class Category( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt index ee034530c638..2320d0f393a1 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param name Updated name of the pet * @param status Updated status of the pet */ -data class InlineObject ( +data class InlineObject( - @ApiModelProperty(example = "null", value = "Updated name of the pet") - @JsonProperty("name") val name: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Updated name of the pet") + @JsonProperty("name") val name: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "Updated status of the pet") - @JsonProperty("status") val status: kotlin.String? = null + @ApiModelProperty(example = "null", value = "Updated status of the pet") + @JsonProperty("status") val status: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt index a289d8c05f79..5443aa323fd5 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param additionalMetadata Additional data to pass to server * @param file file to upload */ -data class InlineObject1 ( +data class InlineObject1( - @ApiModelProperty(example = "null", value = "Additional data to pass to server") - @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Additional data to pass to server") + @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "file to upload") - @JsonProperty("file") val file: org.springframework.core.io.Resource? = null + @ApiModelProperty(example = "null", value = "file to upload") + @JsonProperty("file") val file: org.springframework.core.io.Resource? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 0e86b28e937d..a49f0aea0687 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -17,16 +17,16 @@ import io.swagger.annotations.ApiModelProperty * @param type * @param message */ -data class ModelApiResponse ( +data class ModelApiResponse( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 08726893f7d3..0e12d03b1f86 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -21,25 +21,25 @@ import io.swagger.annotations.ApiModelProperty * @param status Order Status * @param complete */ -data class Order ( +data class Order( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "null", value = "Order Status") - @JsonProperty("status") val status: Order.Status? = null, + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: kotlin.Boolean? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 4a2e9d26cb95..5d3acb0d2ea9 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -16,34 +16,34 @@ import io.swagger.annotations.ApiModelProperty /** * A pet for sale in the pet store - * @param id - * @param category * @param name * @param photoUrls + * @param id + * @param category * @param tags * @param status pet status in the store */ -data class Pet ( +data class Pet( - @get:NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: kotlin.String, + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: kotlin.String, - @get:NotNull - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") val category: Category? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: kotlin.collections.List? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: kotlin.collections.List? = null, - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") val status: Pet.Status? = null + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index df04dcd035dc..5c6ec4d29682 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Tag ( +data class Tag( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index 619b2e7c2c3a..6f2e9f739abe 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -22,31 +22,31 @@ import io.swagger.annotations.ApiModelProperty * @param phone * @param userStatus User Status */ -data class User ( +data class User( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION index e4955748d3e7..bfbf77eb7fad 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt index 4d8400902aa9..44190af7a019 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt @@ -17,13 +17,13 @@ class DefaultExceptionHandler { @ExceptionHandler(value = [ApiException::class]) fun onApiException(ex: ApiException, response: HttpServletResponse): Unit = - response.sendError(ex.code, ex.message) + response.sendError(ex.code, ex.message) @ExceptionHandler(value = [NotImplementedError::class]) fun onNotImplemented(ex: NotImplementedError, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) + response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) @ExceptionHandler(value = [ConstraintViolationException::class]) fun onConstraintViolation(ex: ConstraintViolationException, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) + response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index 4be27d19748b..54ee92921f28 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Category ( +data class Category( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt index ee034530c638..2320d0f393a1 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param name Updated name of the pet * @param status Updated status of the pet */ -data class InlineObject ( +data class InlineObject( - @ApiModelProperty(example = "null", value = "Updated name of the pet") - @JsonProperty("name") val name: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Updated name of the pet") + @JsonProperty("name") val name: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "Updated status of the pet") - @JsonProperty("status") val status: kotlin.String? = null + @ApiModelProperty(example = "null", value = "Updated status of the pet") + @JsonProperty("status") val status: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt index a289d8c05f79..5443aa323fd5 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param additionalMetadata Additional data to pass to server * @param file file to upload */ -data class InlineObject1 ( +data class InlineObject1( - @ApiModelProperty(example = "null", value = "Additional data to pass to server") - @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Additional data to pass to server") + @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "file to upload") - @JsonProperty("file") val file: org.springframework.core.io.Resource? = null + @ApiModelProperty(example = "null", value = "file to upload") + @JsonProperty("file") val file: org.springframework.core.io.Resource? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 0e86b28e937d..a49f0aea0687 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -17,16 +17,16 @@ import io.swagger.annotations.ApiModelProperty * @param type * @param message */ -data class ModelApiResponse ( +data class ModelApiResponse( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 08726893f7d3..0e12d03b1f86 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -21,25 +21,25 @@ import io.swagger.annotations.ApiModelProperty * @param status Order Status * @param complete */ -data class Order ( +data class Order( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "null", value = "Order Status") - @JsonProperty("status") val status: Order.Status? = null, + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: kotlin.Boolean? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 4a2e9d26cb95..5d3acb0d2ea9 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -16,34 +16,34 @@ import io.swagger.annotations.ApiModelProperty /** * A pet for sale in the pet store - * @param id - * @param category * @param name * @param photoUrls + * @param id + * @param category * @param tags * @param status pet status in the store */ -data class Pet ( +data class Pet( - @get:NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: kotlin.String, + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: kotlin.String, - @get:NotNull - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") val category: Category? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: kotlin.collections.List? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: kotlin.collections.List? = null, - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") val status: Pet.Status? = null + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index df04dcd035dc..5c6ec4d29682 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Tag ( +data class Tag( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index 619b2e7c2c3a..6f2e9f739abe 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -22,31 +22,31 @@ import io.swagger.annotations.ApiModelProperty * @param phone * @param userStatus User Status */ -data class User ( +data class User( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } From b36b65964fadeeb36fb6e0bf8b5ad20d29db545c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 3 Feb 2020 16:32:31 +0800 Subject: [PATCH 50/72] update kotlin samples --- .../kotlin/org/openapitools/model/Category.kt | 10 +++--- .../openapitools/model/ModelApiResponse.kt | 14 ++++---- .../kotlin/org/openapitools/model/Order.kt | 26 +++++++------- .../main/kotlin/org/openapitools/model/Pet.kt | 30 ++++++++-------- .../main/kotlin/org/openapitools/model/Tag.kt | 10 +++--- .../kotlin/org/openapitools/model/User.kt | 34 +++++++++---------- .../kotlin/org/openapitools/api/Exceptions.kt | 6 ++-- .../kotlin/org/openapitools/model/Category.kt | 10 +++--- .../openapitools/model/ModelApiResponse.kt | 14 ++++---- .../kotlin/org/openapitools/model/Order.kt | 26 +++++++------- .../main/kotlin/org/openapitools/model/Pet.kt | 30 ++++++++-------- .../main/kotlin/org/openapitools/model/Tag.kt | 10 +++--- .../kotlin/org/openapitools/model/User.kt | 34 +++++++++---------- 13 files changed, 127 insertions(+), 127 deletions(-) diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index f477eb4e7a8a..0ff2490b5fea 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Category ( +data class Category( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 0e86b28e937d..a49f0aea0687 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -17,16 +17,16 @@ import io.swagger.annotations.ApiModelProperty * @param type * @param message */ -data class ModelApiResponse ( +data class ModelApiResponse( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 08726893f7d3..0e12d03b1f86 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -21,25 +21,25 @@ import io.swagger.annotations.ApiModelProperty * @param status Order Status * @param complete */ -data class Order ( +data class Order( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "null", value = "Order Status") - @JsonProperty("status") val status: Order.Status? = null, + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: kotlin.Boolean? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index e92ce4094794..5d3acb0d2ea9 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -23,27 +23,27 @@ import io.swagger.annotations.ApiModelProperty * @param tags * @param status pet status in the store */ -data class Pet ( +data class Pet( - @get:NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: kotlin.String, + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: kotlin.String, - @get:NotNull - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") val category: Category? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: kotlin.collections.List? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: kotlin.collections.List? = null, - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") val status: Pet.Status? = null + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index df04dcd035dc..5c6ec4d29682 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Tag ( +data class Tag( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index 619b2e7c2c3a..6f2e9f739abe 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -22,31 +22,31 @@ import io.swagger.annotations.ApiModelProperty * @param phone * @param userStatus User Status */ -data class User ( +data class User( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt index 4d8400902aa9..44190af7a019 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt @@ -17,13 +17,13 @@ class DefaultExceptionHandler { @ExceptionHandler(value = [ApiException::class]) fun onApiException(ex: ApiException, response: HttpServletResponse): Unit = - response.sendError(ex.code, ex.message) + response.sendError(ex.code, ex.message) @ExceptionHandler(value = [NotImplementedError::class]) fun onNotImplemented(ex: NotImplementedError, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) + response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) @ExceptionHandler(value = [ConstraintViolationException::class]) fun onConstraintViolation(ex: ConstraintViolationException, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) + response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index f477eb4e7a8a..0ff2490b5fea 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Category ( +data class Category( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 0e86b28e937d..a49f0aea0687 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -17,16 +17,16 @@ import io.swagger.annotations.ApiModelProperty * @param type * @param message */ -data class ModelApiResponse ( +data class ModelApiResponse( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 08726893f7d3..0e12d03b1f86 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -21,25 +21,25 @@ import io.swagger.annotations.ApiModelProperty * @param status Order Status * @param complete */ -data class Order ( +data class Order( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "null", value = "Order Status") - @JsonProperty("status") val status: Order.Status? = null, + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: kotlin.Boolean? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index e92ce4094794..5d3acb0d2ea9 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -23,27 +23,27 @@ import io.swagger.annotations.ApiModelProperty * @param tags * @param status pet status in the store */ -data class Pet ( +data class Pet( - @get:NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: kotlin.String, + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: kotlin.String, - @get:NotNull - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") val category: Category? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: kotlin.collections.List? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: kotlin.collections.List? = null, - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") val status: Pet.Status? = null + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index df04dcd035dc..5c6ec4d29682 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Tag ( +data class Tag( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index 619b2e7c2c3a..6f2e9f739abe 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -22,31 +22,31 @@ import io.swagger.annotations.ApiModelProperty * @param phone * @param userStatus User Status */ -data class User ( +data class User( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } From fbcb8e0c7ea7261a36a4789b69a001c9528d15ef Mon Sep 17 00:00:00 2001 From: Ben Cox <1038350+ind1go@users.noreply.github.com> Date: Mon, 3 Feb 2020 09:11:59 +0000 Subject: [PATCH 51/72] [java-jersey2] Fix empty body when form parameters supplied (#5169) --- .../main/resources/Java/libraries/jersey2/ApiClient.mustache | 4 ++-- .../src/main/java/org/openapitools/client/ApiClient.java | 4 ++-- .../src/main/java/org/openapitools/client/ApiClient.java | 4 ++-- .../src/main/java/org/openapitools/client/ApiClient.java | 4 ++-- 4 files changed, 8 insertions(+), 8 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 0f83a20450f5..95fb8093bc3b 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 @@ -573,7 +573,7 @@ public class ApiClient { entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); } else { // We let jersey handle the serialization - entity = Entity.entity(obj, contentType); + entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType); } return entity; } @@ -732,7 +732,7 @@ public class ApiClient { } } - Entity entity = (body == null) ? Entity.json("") : serialize(body, formParams, contentType); + Entity entity = serialize(body, formParams, contentType); Response response = null; diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java index 7776f178e8ee..35d6ae5c9af9 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java @@ -562,7 +562,7 @@ public Entity serialize(Object obj, Map formParams, String co entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); } else { // We let jersey handle the serialization - entity = Entity.entity(obj, contentType); + entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType); } return entity; } @@ -716,7 +716,7 @@ public ApiResponse invokeAPI(String path, String method, List query } } - Entity entity = (body == null) ? Entity.json("") : serialize(body, formParams, contentType); + Entity entity = serialize(body, formParams, contentType); Response response = null; 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 a0aff556422b..dcc41e43f5d0 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 @@ -563,7 +563,7 @@ public Entity serialize(Object obj, Map formParams, String co entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); } else { // We let jersey handle the serialization - entity = Entity.entity(obj, contentType); + entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType); } return entity; } @@ -716,7 +716,7 @@ public ApiResponse invokeAPI(String path, String method, List query } } - Entity entity = (body == null) ? Entity.json("") : serialize(body, formParams, contentType); + Entity entity = serialize(body, formParams, contentType); Response response = null; diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java index a0aff556422b..dcc41e43f5d0 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java @@ -563,7 +563,7 @@ public Entity serialize(Object obj, Map formParams, String co entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); } else { // We let jersey handle the serialization - entity = Entity.entity(obj, contentType); + entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType); } return entity; } @@ -716,7 +716,7 @@ public ApiResponse invokeAPI(String path, String method, List query } } - Entity entity = (body == null) ? Entity.json("") : serialize(body, formParams, contentType); + Entity entity = serialize(body, formParams, contentType); Response response = null; From 149778a7e70d477fe0b804643342563d57fc8ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fr=C4=85k?= <46451063+daniel-frak@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:33:05 +0100 Subject: [PATCH 52/72] [typescript-angular]: objects as query parameters no longer break when fields are null (#5197) * #5174 fix [BUG] [typescript-angular]: objects as query parameters break when fields are null * #5174 Shell scripts run * #5174 Code style fix * #5174 Regenerate typescript-angular samples * #5174 Regenerate typescript-angular samples a second time --- .../main/resources/typescript-angular/api.service.mustache | 6 +++++- .../typescript-angular-v2/default/api/pet.service.ts | 6 +++++- .../typescript-angular-v2/default/api/store.service.ts | 6 +++++- .../typescript-angular-v2/default/api/user.service.ts | 6 +++++- .../petstore/typescript-angular-v2/npm/api/pet.service.ts | 6 +++++- .../petstore/typescript-angular-v2/npm/api/store.service.ts | 6 +++++- .../petstore/typescript-angular-v2/npm/api/user.service.ts | 6 +++++- .../with-interfaces/api/pet.service.ts | 6 +++++- .../with-interfaces/api/store.service.ts | 6 +++++- .../with-interfaces/api/user.service.ts | 6 +++++- .../petstore/typescript-angular-v4.3/npm/api/pet.service.ts | 6 +++++- .../typescript-angular-v4.3/npm/api/store.service.ts | 6 +++++- .../typescript-angular-v4.3/npm/api/user.service.ts | 6 +++++- .../petstore/typescript-angular-v4/npm/api/pet.service.ts | 6 +++++- .../petstore/typescript-angular-v4/npm/api/store.service.ts | 6 +++++- .../petstore/typescript-angular-v4/npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 6 +++++- .../builds/default/api/store.service.ts | 6 +++++- .../builds/default/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 6 +++++- .../builds/default/api/store.service.ts | 6 +++++- .../builds/default/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 6 +++++- .../builds/default/api/store.service.ts | 6 +++++- .../builds/default/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 6 +++++- .../builds/default/api/store.service.ts | 6 +++++- .../builds/default/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/single-request-parameter/api/pet.service.ts | 6 +++++- .../builds/single-request-parameter/api/store.service.ts | 6 +++++- .../builds/single-request-parameter/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/with-prefixed-module-name/api/pet.service.ts | 6 +++++- .../builds/with-prefixed-module-name/api/store.service.ts | 6 +++++- .../builds/with-prefixed-module-name/api/user.service.ts | 6 +++++- 49 files changed, 245 insertions(+), 49 deletions(-) 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 87cadfeffd01..38ffa081b85a 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 @@ -160,7 +160,11 @@ export class {{classname}} { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index b3e2c36aff6c..a2a05d7464ed 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -213,7 +213,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts index 8a1423204db1..3cff4ba2c0ea 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts @@ -125,7 +125,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts index f26457950958..0b4f7dd74b11 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts @@ -195,7 +195,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index b3e2c36aff6c..a2a05d7464ed 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -213,7 +213,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts index 8a1423204db1..3cff4ba2c0ea 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts @@ -125,7 +125,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts index f26457950958..0b4f7dd74b11 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts @@ -195,7 +195,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index 465d6937c640..b3230d244e2a 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -216,7 +216,11 @@ export class PetService implements PetServiceInterface { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts index 915597477ef3..f945e50874c8 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts @@ -128,7 +128,11 @@ export class StoreService implements StoreServiceInterface { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts index 21ca1cc63355..541eafd71dee 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts @@ -198,7 +198,11 @@ export class UserService implements UserServiceInterface { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts index 8426b43a3afe..b5bf94fba2c6 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts index 633f00b1d6e0..6e521f729e49 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts index 9eea4e0e3dc3..4ad369e9cdf8 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts index b3e2c36aff6c..a2a05d7464ed 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts @@ -213,7 +213,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts index 8a1423204db1..3cff4ba2c0ea 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts @@ -125,7 +125,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts index f26457950958..0b4f7dd74b11 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts @@ -195,7 +195,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index dc1719750f1e..35d6f883accc 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts index af2d5a127a9b..22db3e3008b2 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts index c4ea31b47872..50ba2dfddcd1 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index dc1719750f1e..35d6f883accc 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts index af2d5a127a9b..22db3e3008b2 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts index c4ea31b47872..50ba2dfddcd1 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index fc90178d82f5..91bbce5b7476 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts index 2ce18a1079ba..d169e06083a5 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts index 6e5337b51d1e..91092c93225f 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index fc90178d82f5..91bbce5b7476 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts index 2ce18a1079ba..d169e06083a5 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts index 6e5337b51d1e..91092c93225f 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts index dc1719750f1e..35d6f883accc 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts index af2d5a127a9b..22db3e3008b2 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts index c4ea31b47872..50ba2dfddcd1 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts index dc1719750f1e..35d6f883accc 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts index af2d5a127a9b..22db3e3008b2 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts index c4ea31b47872..50ba2dfddcd1 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts index fc90178d82f5..91bbce5b7476 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts index 2ce18a1079ba..d169e06083a5 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts index 6e5337b51d1e..91092c93225f 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts index fc90178d82f5..91bbce5b7476 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts index 2ce18a1079ba..d169e06083a5 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts index 6e5337b51d1e..91092c93225f 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts index f429414093f1..0e2f4d61ae20 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts @@ -109,7 +109,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts index 1e66b9a6bb8e..ec3164d42299 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts @@ -70,7 +70,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts index b5ba06f79c33..641080f297b1 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts @@ -88,7 +88,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts index fc90178d82f5..91bbce5b7476 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts index 2ce18a1079ba..d169e06083a5 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts index 6e5337b51d1e..91092c93225f 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts index fc90178d82f5..91bbce5b7476 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts index 2ce18a1079ba..d169e06083a5 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts index 6e5337b51d1e..91092c93225f 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); From dcc914421e1c58851370050abe823e63fce72b13 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Mon, 3 Feb 2020 06:56:42 -0800 Subject: [PATCH 53/72] [codegen] Performance optimizations: use of cache for camel case and sanitized strings (#5152) * use of cache for camel case and sanitized strings * use of cache for camel case, sanitized strings and underscored words --- .../openapitools/codegen/DefaultCodegen.java | 24 +++++++- .../codegen/utils/StringUtils.java | 55 ++++++++++++++----- 2 files changed, 63 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 6d704fe95092..40954fb1fe54 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 @@ -4343,6 +4343,11 @@ public String sanitizeName(String name, String removeCharRegEx) { return sanitizeName(name, removeCharRegEx, new ArrayList()); } + // A cache of sanitized words. The sanitizeName() method is invoked many times with the same + // arguments, this cache is used to optimized performance. + private static Map, String>>> sanitizedNames = + new HashMap, String>>>(); + /** * Sanitize name (parameter, property, method, etc) * @@ -4369,6 +4374,21 @@ public String sanitizeName(String name, String removeCharRegEx, ArrayList, String>> m1 = sanitizedNames.get(name); + if (m1 == null) { + m1 = new HashMap, String>>(); + sanitizedNames.put(name, m1); + } + Map, String> m2 = m1.get(removeCharRegEx); + if (m2 == null) { + m2 = new HashMap, String>(); + m1.put(removeCharRegEx, m2); + } + List l = Collections.unmodifiableList(exceptionList); + if (m2.containsKey(l)) { + return m2.get(l); + } + // input[] => input name = this.sanitizeValue(name, "\\[\\]", "", exceptionList); @@ -4404,7 +4424,7 @@ public String sanitizeName(String name, String removeCharRegEx, ArrayList> camelizedWords = + new HashMap>(); + + // A cache of underscored words, used to optimize the performance of the underscore() method. + private static Map underscoreWords = new HashMap(); + + static { + camelizedWords.put(false, new HashMap()); + camelizedWords.put(true, new HashMap()); + } + /** * Underscore the given word. * Copied from Twitter elephant bird @@ -16,11 +30,15 @@ public class StringUtils { * @return The underscored version of the word */ public static String underscore(final String word) { + String result = underscoreWords.get(word); + if (result != null) { + return result; + } String firstPattern = "([A-Z]+)([A-Z][a-z])"; String secondPattern = "([a-z\\d])([A-Z])"; String replacementPattern = "$1_$2"; // Replace package separator with slash. - String result = word.replaceAll("\\.", "/"); + result = word.replaceAll("\\.", "/"); // Replace $ with two underscores for inner classes. result = result.replaceAll("\\$", "__"); // Replace capital letter with _ plus lowercase letter. @@ -30,6 +48,7 @@ public static String underscore(final String word) { // replace space with underscore result = result.replace(' ', '_'); result = result.toLowerCase(Locale.ROOT); + underscoreWords.put(word, result); return result; } @@ -55,6 +74,11 @@ public static String camelize(String word) { return camelize(word, false); } + private static Pattern camelizeSlashPattern = Pattern.compile("\\/(.?)"); + private static Pattern camelizeUppercasePattern = Pattern.compile("(\\.?)(\\w)([^\\.]*)$"); + private static Pattern camelizeUnderscorePattern = Pattern.compile("(_)(.)"); + private static Pattern camelizeHyphenPattern = Pattern.compile("(-)(.)"); + /** * Camelize name (parameter, property, method, etc) * @@ -63,12 +87,16 @@ public static String camelize(String word) { * @return camelized string */ public static String camelize(String word, boolean lowercaseFirstLetter) { + String inputWord = word; + String camelized = camelizedWords.get(lowercaseFirstLetter).get(word); + if (camelized != null) { + return camelized; + } // Replace all slashes with dots (package separator) - Pattern p = Pattern.compile("\\/(.?)"); - Matcher m = p.matcher(word); + Matcher m = camelizeSlashPattern.matcher(word); while (m.find()) { word = m.replaceFirst("." + m.group(1)/*.toUpperCase()*/); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - m = p.matcher(word); + m = camelizeSlashPattern.matcher(word); } // case out dots @@ -81,15 +109,14 @@ public static String camelize(String word, boolean lowercaseFirstLetter) { } word = f.toString(); - m = p.matcher(word); + m = camelizeSlashPattern.matcher(word); while (m.find()) { word = m.replaceFirst("" + Character.toUpperCase(m.group(1).charAt(0)) + m.group(1).substring(1)/*.toUpperCase()*/); - m = p.matcher(word); + m = camelizeSlashPattern.matcher(word); } // Uppercase the class name. - p = Pattern.compile("(\\.?)(\\w)([^\\.]*)$"); - m = p.matcher(word); + m = camelizeUppercasePattern.matcher(word); if (m.find()) { String rep = m.group(1) + m.group(2).toUpperCase(Locale.ROOT) + m.group(3); rep = rep.replaceAll("\\$", "\\\\\\$"); @@ -97,8 +124,7 @@ public static String camelize(String word, boolean lowercaseFirstLetter) { } // Remove all underscores (underscore_case to camelCase) - p = Pattern.compile("(_)(.)"); - m = p.matcher(word); + m = camelizeUnderscorePattern.matcher(word); while (m.find()) { String original = m.group(2); String upperCase = original.toUpperCase(Locale.ROOT); @@ -107,15 +133,14 @@ public static String camelize(String word, boolean lowercaseFirstLetter) { } else { word = m.replaceFirst(upperCase); } - m = p.matcher(word); + m = camelizeUnderscorePattern.matcher(word); } // Remove all hyphens (hyphen-case to camelCase) - p = Pattern.compile("(-)(.)"); - m = p.matcher(word); + m = camelizeHyphenPattern.matcher(word); while (m.find()) { word = m.replaceFirst(m.group(2).toUpperCase(Locale.ROOT)); - m = p.matcher(word); + m = camelizeHyphenPattern.matcher(word); } if (lowercaseFirstLetter && word.length() > 0) { @@ -132,6 +157,8 @@ public static String camelize(String word, boolean lowercaseFirstLetter) { // remove all underscore word = word.replaceAll("_", ""); + // Add to the cache. + camelizedWords.get(lowercaseFirstLetter).put(inputWord, word); return word; } From 67e4cc8be1756d68ed828a20b3278e4921c50a80 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Mon, 3 Feb 2020 09:39:17 -0800 Subject: [PATCH 54/72] [Python] Python HTTP signature update (#5154) * improve python documentation and add import to __init__package.mustache * improve python documentation and add import to __init__package.mustache * add signing_info parameter conditionally * add code comments and remove 'Content-Length' header from example * Remove debug log statement * set access_token to None by default * set access_token to None by default * fix unit tests for Python experimental * fix trailing space --- .../codegen/DefaultGenerator.java | 6 +++ .../codegen/utils/ProcessUtils.java | 37 ++++++++++++- .../resources/python/configuration.mustache | 41 +++++++++++++-- .../__init__package.mustache | 3 ++ .../python-experimental/signing.mustache | 20 ++++++- .../petstore_api/configuration.py | 52 ++++--------------- .../petstore_api/configuration.py | 52 ++++--------------- .../python-experimental/tests/test_pet_api.py | 5 ++ .../petstore_api/configuration.py | 52 ++++--------------- .../python/petstore_api/configuration.py | 52 ++++--------------- .../petstore_api/__init__.py | 1 + .../petstore_api/configuration.py | 25 +++++++-- .../petstore_api/signing.py | 20 ++++++- .../python/petstore_api/configuration.py | 52 ++++--------------- 14 files changed, 199 insertions(+), 219 deletions(-) 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 2debd1ba7fa1..774b5159b969 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 @@ -855,6 +855,12 @@ private Map buildSupportFileBundle(List allOperations, L if (ProcessUtils.hasHttpSignatureMethods(authMethods)) { bundle.put("hasHttpSignatureMethods", true); } + if (ProcessUtils.hasHttpBasicMethods(authMethods)) { + bundle.put("hasHttpBasicMethods", true); + } + if (ProcessUtils.hasApiKeyMethods(authMethods)) { + bundle.put("hasApiKeyMethods", true); + } } List servers = config.fromServers(openAPI.getServers()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java index 499c1d55308a..91b7b674d66a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ProcessUtils.java @@ -94,13 +94,48 @@ public static boolean hasBearerMethods(Map objs) { return false; } + /** + * Returns true if the specified OAS model has at least one operation with the HTTP basic + * security scheme. + * + * @param authMethods List of auth methods. + * @return True if at least one operation has HTTP basic security scheme defined + */ + public static boolean hasHttpBasicMethods(List authMethods) { + if (authMethods != null && !authMethods.isEmpty()) { + for (CodegenSecurity cs : authMethods) { + if (Boolean.TRUE.equals(cs.isBasicBasic)) { + return true; + } + } + } + return false; + } + + /** + * Returns true if the specified OAS model has at least one operation with API keys. + * + * @param authMethods List of auth methods. + * @return True if at least one operation has API key security scheme defined + */ + public static boolean hasApiKeyMethods(List authMethods) { + if (authMethods != null && !authMethods.isEmpty()) { + for (CodegenSecurity cs : authMethods) { + if (Boolean.TRUE.equals(cs.isApiKey)) { + return true; + } + } + } + return false; + } + /** * Returns true if the specified OAS model has at least one operation with the HTTP signature * security scheme. * The HTTP signature scheme is defined in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ * * @param authMethods List of auth methods. - * @return True if at least one operation has HTTP signature security schema defined + * @return True if at least one operation has HTTP signature security scheme defined */ public static boolean hasHttpSignatureMethods(List authMethods) { if (authMethods != null && !authMethods.isEmpty()) { diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index 3e0a15676575..0645bc46755a 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -31,11 +31,16 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. +{{#hasHttpSignatureMethods}} + :param signing_info: Configuration parameters for the HTTP signature security scheme. Must be an instance of {{{packageName}}}.signing.HttpSigningConfiguration +{{/hasHttpSignatureMethods}} +{{#hasAuthMethods}} :Example: +{{#hasApiKeyMethods}} + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -51,12 +56,32 @@ class Configuration(object): ) The following cookie will be added to the HTTP request: Cookie: JSESSIONID abc123 +{{/hasApiKeyMethods}} +{{#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', ) +{{/hasHttpBasicMethods}} +{{#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 @@ -83,18 +108,22 @@ class Configuration(object): signing.HEADER_DATE, signing.HEADER_DIGEST, 'Content-Type', - 'Content-Length', 'User-Agent' ], signature_max_validity = datetime.timedelta(minutes=5) ) ) +{{/hasHttpSignatureMethods}} +{{/hasAuthMethods}} """ def __init__(self, host="{{{basePath}}}", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): +{{#hasHttpSignatureMethods}} + signing_info=None, +{{/hasHttpSignatureMethods}} + ): """Constructor """ self.host = host @@ -123,19 +152,21 @@ class Configuration(object): self.password = password """Password for HTTP basic authentication """ +{{#hasHttpSignatureMethods}} if signing_info is not None: signing_info.host = host self.signing_info = signing_info """The HTTP signing configuration """ +{{/hasHttpSignatureMethods}} {{#hasOAuthMethods}} - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ {{/hasOAuthMethods}} {{^hasOAuthMethods}} {{#hasBearerMethods}} - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ {{/hasBearerMethods}} diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/__init__package.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/__init__package.mustache index b5224a5821e7..1d74d016ab47 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/__init__package.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/__init__package.mustache @@ -20,6 +20,9 @@ from {{packageName}}.api_client import ApiClient # import Configuration from {{packageName}}.configuration import Configuration +{{#hasHttpSignatureMethods}} +from {{packageName}}.signing import HttpSigningConfiguration +{{/hasHttpSignatureMethods}} # import exceptions from {{packageName}}.exceptions import OpenApiException diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache index d191bbf48529..300efa007bfc 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache @@ -15,18 +15,35 @@ import re from six.moves.urllib.parse import urlencode, urlparse from time import mktime +# 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' -HEADER_DIGEST = 'Digest' # RFC 3230, include digest of the HTTP request body. +# 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' @@ -364,5 +381,4 @@ class HttpSigningConfiguration(object): auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( headers_value, signed_msg.decode('ascii')) - print("AUTH: {0}".format(auth_str)) return auth_str diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index 50cca10222c0..82fd3361968c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -36,11 +36,10 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. - Must be an instance of petstore_api.signing.HttpSigningConfiguration :Example: + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -57,49 +56,25 @@ class Configuration(object): 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', ) - - 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 = signing.SCHEME_HS2019, - signing_algorithm = signing.ALGORITHM_RSASSA_PSS, - signed_headers = [signing.HEADER_REQUEST_TARGET, - signing.HEADER_CREATED, - signing.HEADER_EXPIRES, - signing.HEADER_HOST, - signing.HEADER_DATE, - signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) - ) """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): + ): """Constructor """ self.host = host @@ -128,12 +103,7 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.password = password """Password for HTTP basic authentication """ - if signing_info is not None: - signing_info.host = host - self.signing_info = signing_info - """The HTTP signing configuration - """ - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ self.logger = {} diff --git a/samples/client/petstore/python-experimental/petstore_api/configuration.py b/samples/client/petstore/python-experimental/petstore_api/configuration.py index cf2819c1d06c..faadfd56055b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/configuration.py +++ b/samples/client/petstore/python-experimental/petstore_api/configuration.py @@ -37,11 +37,10 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. - Must be an instance of petstore_api.signing.HttpSigningConfiguration :Example: + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -58,49 +57,25 @@ class Configuration(object): 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', ) - - 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 = signing.SCHEME_HS2019, - signing_algorithm = signing.ALGORITHM_RSASSA_PSS, - signed_headers = [signing.HEADER_REQUEST_TARGET, - signing.HEADER_CREATED, - signing.HEADER_EXPIRES, - signing.HEADER_HOST, - signing.HEADER_DATE, - signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) - ) """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): + ): """Constructor """ self.host = host @@ -129,12 +104,7 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.password = password """Password for HTTP basic authentication """ - if signing_info is not None: - signing_info.host = host - self.signing_info = signing_info - """The HTTP signing configuration - """ - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ self.logger = {} diff --git a/samples/client/petstore/python-experimental/tests/test_pet_api.py b/samples/client/petstore/python-experimental/tests/test_pet_api.py index 9a0c4f76fa1f..919d2505423f 100644 --- a/samples/client/petstore/python-experimental/tests/test_pet_api.py +++ b/samples/client/petstore/python-experimental/tests/test_pet_api.py @@ -121,6 +121,11 @@ def test_config(self): self.assertIsNotNone(config.get_host_settings()) self.assertEqual(config.get_basic_auth_token(), urllib3.util.make_headers(basic_auth=":").get('authorization')) + # No authentication scheme has been configured at this point, so auth_settings() + # should return an empty list. + self.assertEqual(len(config.auth_settings()), 0) + # Configure OAuth2 access token and verify the auth_settings have OAuth2 parameters. + config.access_token = 'MY-ACCESS_TOKEN' self.assertEqual(len(config.auth_settings()), 1) self.assertIn("petstore_auth", config.auth_settings().keys()) config.username = "user" diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index cf2819c1d06c..faadfd56055b 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -37,11 +37,10 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. - Must be an instance of petstore_api.signing.HttpSigningConfiguration :Example: + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -58,49 +57,25 @@ class Configuration(object): 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', ) - - 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 = signing.SCHEME_HS2019, - signing_algorithm = signing.ALGORITHM_RSASSA_PSS, - signed_headers = [signing.HEADER_REQUEST_TARGET, - signing.HEADER_CREATED, - signing.HEADER_EXPIRES, - signing.HEADER_HOST, - signing.HEADER_DATE, - signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) - ) """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): + ): """Constructor """ self.host = host @@ -129,12 +104,7 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.password = password """Password for HTTP basic authentication """ - if signing_info is not None: - signing_info.host = host - self.signing_info = signing_info - """The HTTP signing configuration - """ - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ self.logger = {} diff --git a/samples/client/petstore/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py index cf2819c1d06c..faadfd56055b 100644 --- a/samples/client/petstore/python/petstore_api/configuration.py +++ b/samples/client/petstore/python/petstore_api/configuration.py @@ -37,11 +37,10 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. - Must be an instance of petstore_api.signing.HttpSigningConfiguration :Example: + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -58,49 +57,25 @@ class Configuration(object): 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', ) - - 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 = signing.SCHEME_HS2019, - signing_algorithm = signing.ALGORITHM_RSASSA_PSS, - signed_headers = [signing.HEADER_REQUEST_TARGET, - signing.HEADER_CREATED, - signing.HEADER_EXPIRES, - signing.HEADER_HOST, - signing.HEADER_DATE, - signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) - ) """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): + ): """Constructor """ self.host = host @@ -129,12 +104,7 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.password = password """Password for HTTP basic authentication """ - if signing_info is not None: - signing_info.host = host - self.signing_info = signing_info - """The HTTP signing configuration - """ - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ self.logger = {} diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py index 2c9bc6e12f0b..597e3243e317 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py @@ -30,6 +30,7 @@ # import Configuration from petstore_api.configuration import Configuration +from petstore_api.signing import HttpSigningConfiguration # import exceptions from petstore_api.exceptions import OpenApiException diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py index 99d8bac4b3d3..cce89b13acae 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/configuration.py @@ -37,11 +37,12 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. + :param signing_info: Configuration parameters for the HTTP signature security scheme. Must be an instance of petstore_api.signing.HttpSigningConfiguration :Example: + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -58,12 +59,28 @@ class Configuration(object): 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. @@ -89,7 +106,6 @@ class Configuration(object): signing.HEADER_DATE, signing.HEADER_DIGEST, 'Content-Type', - 'Content-Length', 'User-Agent' ], signature_max_validity = datetime.timedelta(minutes=5) @@ -100,7 +116,8 @@ class Configuration(object): def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): + signing_info=None, + ): """Constructor """ self.host = host @@ -134,7 +151,7 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.signing_info = signing_info """The HTTP signing configuration """ - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ self.logger = {} diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py index da45fdf4b22a..758f62fc0c29 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py @@ -23,18 +23,35 @@ from six.moves.urllib.parse import urlencode, urlparse from time import mktime +# 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' -HEADER_DIGEST = 'Digest' # RFC 3230, include digest of the HTTP request body. +# 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' @@ -372,5 +389,4 @@ def _get_authorization_header(self, signed_headers, signed_msg): auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( headers_value, signed_msg.decode('ascii')) - print("AUTH: {0}".format(auth_str)) return auth_str diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index 1bb8505ee8b5..131534656e34 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -37,11 +37,10 @@ class Configuration(object): 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 signing_info: Configuration parameters for HTTP signature. - Must be an instance of petstore_api.signing.HttpSigningConfiguration :Example: + API Key Authentication Example. Given the following security scheme in the OpenAPI specification: components: securitySchemes: @@ -58,49 +57,25 @@ class Configuration(object): 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', ) - - 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 = signing.SCHEME_HS2019, - signing_algorithm = signing.ALGORITHM_RSASSA_PSS, - signed_headers = [signing.HEADER_REQUEST_TARGET, - signing.HEADER_CREATED, - signing.HEADER_EXPIRES, - signing.HEADER_HOST, - signing.HEADER_DATE, - signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) - ) """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, username=None, password=None, - signing_info=None): + ): """Constructor """ self.host = host @@ -129,12 +104,7 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.password = password """Password for HTTP basic authentication """ - if signing_info is not None: - signing_info.host = host - self.signing_info = signing_info - """The HTTP signing configuration - """ - self.access_token = "" + self.access_token = None """access token for OAuth/Bearer """ self.logger = {} From e45a1d03c0bad76e5db8528b5a6e47583688cfad Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Mon, 3 Feb 2020 19:42:11 +0100 Subject: [PATCH 55/72] Fix typo in jar URL on installation page (#5200) --- docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index ff84a2de7717..a974db16c15d 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -85,7 +85,7 @@ JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator For **Mac/Linux** users: ```bash -wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.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. From 5b9b8bda7613a5b0144364dcfb627311a081bff6 Mon Sep 17 00:00:00 2001 From: Kazuyuki Miyake Date: Tue, 4 Feb 2020 23:07:50 +0900 Subject: [PATCH 56/72] add freee to the user list (#5203) --- README.md | 1 + website/dynamic/users.yml | 5 +++++ website/static/img/companies/freee.png | Bin 0 -> 12679 bytes 3 files changed, 6 insertions(+) create mode 100644 website/static/img/companies/freee.png diff --git a/README.md b/README.md index 75d9475a558a..fbe7b2db50e1 100644 --- a/README.md +++ b/README.md @@ -590,6 +590,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Element AI](https://www.elementai.com/) - [Embotics](https://www.embotics.com/) - [Fenergo](https://www.fenergo.com/) +- [freee](https://corp.freee.co.jp/en/) - [FreshCells](https://www.freshcells.de/) - [Fuse](https://www.fuse.no/) - [Gantner](https://www.gantner.com) diff --git a/website/dynamic/users.yml b/website/dynamic/users.yml index 225ec7fb4955..ddc1bf006488 100644 --- a/website/dynamic/users.yml +++ b/website/dynamic/users.yml @@ -118,6 +118,11 @@ image: "img/companies/element_ai.png" infoLink: "https://www.elementai.com/" pinned: false +- + caption: "freee" + image: "img/companies/freee.png" + infoLink: "https://corp.freee.co.jp/en/" + pinned: false - caption: "Fenergo" image: "img/companies/fenergo.png" diff --git a/website/static/img/companies/freee.png b/website/static/img/companies/freee.png new file mode 100644 index 0000000000000000000000000000000000000000..7ad6e1117dbe151c7ecad86626dca1e6fac981bc GIT binary patch literal 12679 zcmc(_Wn5g(vMxL!kl+x41VV5K?(Xgm!CeNo!96&E;O+r}dj=h3f;+)s&_Iyj?skX& zIeXvz;XUvDcJF*x)2n{n)z7M`w(94Lsz9S(3>)m|9t?Tbf#Uy9`5Z8UY=605DWM-CDHjY9RN3Bo_G8+pa3T-YWRwZW%OKTfhACRSn zkFut@kDWQ61%-$(nV=UxT!Dk7n<<%>gT13Gzn2ijKYID$m6UdT`i;$r6VdLZDV_{`yVP|K8*I;t>c62lK zVsdn){FeqvOILG{jkBALlOx%)MpH8Qc~a4;;-p8XF` z|4Rf9pXcJg;}-t%@5r}wgoir_9@m!GY#0Cl)2*DOn5Ngle$MM=yxyCL?O@p?c$5@~ z)#cMQew(lp=S=t}T^F3FV>Ufs+hbiIt@gI?<~`ahX9z}})Yn%NJ&|wBBj5S%qn4J+ zs$tju-h6tPZ`s;_Sb6?xY2DuEyYkQ5_QgNUSkB4GS-v?K;aTOZ)T!%w0UwPU86LRL z|71GPV-x#%w0|~v7Kqk93;s*oiSTbRBHFV!80q=>j~E&Mx%eOAe{=x;5&x%-|3|9h zF)B9rTrn^(mdHO76}yalA8RCZXpDnlgJ(vCxqV^#%;4zanD=ZEi3kI)8MG<~YG?-B zx8PtK7_~0zM|r_7-VCmA2>g^Bwva~$bOxKe_$-f_a@p82usK5p*@DiJc~V&!#MJ90G&9ml$!wYG*D)VN@R@pACymCJX?>w2oB|~gR3kE1f<3d#f|!;=e%((;sF=P2fZHedEvlsNko5lvFNSoeaVT#}!+7t)`y0@_PJ>BB1yr6v& zEIOGP5Gsa+W-*cOV3QSLfPLcT54NI9f&8%tm*#Se#1o;QyE8pY&bKri4(m@KQfyXRZ<`$z+url??*30ryMC_;lr*T9b#8bY^0Fg~D= z{{4L>nvedsfcPW%yL8T8$zA<7cT1|h{DM8)0$J^4e(CeKpBK?Tn*`nBFi1GKmch28 zsapDs9vNuMAT6u@4z99_KQ@6)_%{bJ6oJro^w-Or)g|pUP#OGtZvt?8%ObqL(ztND z4~qsSjmDDfVHVKD$#RD2Bz&GdyQnX5NKyg5BS?=-VG`k)Lw;r{)!Xa%W>S7Ji|7s; zLLDIv9voRUo()1xEtm{&5b6xgL=2;td^44jES z3(ixsb??os_CkIHZrr)ZC}tLp7N=vdwodg7*?lS<2BC|z4*Y6zt;mmE{qw;P8)Q<0 zFM z>xdQCXmo>+^*fZwQqT26;<-JRmTy)i<_T0BhO8SXs!m7ehKAVO-((V~uI}Qd3_?tT zQt|Ysk~Y6y%&=qS@087HB)Wh4INj=@8vMO!q5X-qWUe;I;n8+hhytcF{KS6fl~ui0 zPMZ0mj9&yw^!SO+SjCq`(&B)kXUMTZ_391dxItY}8{YK+EdeQRAf@)U$=d!-E6PMO%gTmG)O`m3G#=RTI!Z?83lB{(WOGg1og%Lo)SfDMW=A_Tmk z4igXK6(FXb5!58>r6Fs(XA(Yi)V&jX-8=QD$!8y zC-}U@i3iiR#ruH}^w3qQ!hl%>BahKKAuZC}tB$pv9f?f0I7+Xwyn0F^?x=q<<))=6 z3uj}g4)P^`|CDe! zia3Z@A~|(bGCRP*U|jXy@Z5G6$|F#)$&qEJ^x4E_3S&a6v1P=5QHw;rV*k(y?+Ga1 zaJU-@#QPiVHIx254fY_y9np@B1zA^1M|(ff!1Uy_buBE5OiOX}f=!N#%CpvRxQBkj zg>>;s7SwwIGrqp_$}#JhEB_zy=<4^ z?HyO*>GcTx?O#p;-e4Lj%)&WXM-D^ss0&bp&UN+d{#c4yaz=+>#LRAV{K{Ei48m9W z5ywOY@^=u2sCsp1WlqEP!ZLKqVet)vu}kOiuT;7Z>LiI3$^-U~O%#k+|c z;WwYxg%tEebug+}lh0nPd1M__kP|Td!BtTp19y3 z5^k$?WA*n$>T-Rz!*BVB(II1UhkjN{(k0UTmxSKmZ^y7WpRQ)Dv&oxZsiYpe zDY-dGx78#}RdbETit0sty#9%Ci2Oj=gP_o1UIUR{s&{~H>%2Qslv*BFMl);Zp zyvEYvLMyR=*7+@Fa1DW6!8d1-Mz=uEPV`jTdgLXj{~ve5BJIRRLB};;EeNh$fzhZd zC&$2~<1T`6juE-pnyc;?IRU3a2NLHsp^F;tPR_EMdtuC2pqT@HVn-l;Hz?qtLS)w; zFF{d!bE9@(sqtxw{AM&Pq%p3lpmgNHd}U@8e7}-$-t0Y#cwRg0WM1f7K{s?7e3ZMM zzv;}qMDjU}ZWCgq8O-@>E>fpO)~xsGjsOKQ+Q+tI>p)YW!_O_Y!F;6VXTt#9xr$Uz zln?jj@5dbjvnr+g$Qwt-Tz# z^k%Z9;__o7+pv|0mo+Z4jFV%KyqKJtn`lh-Kyz@=k zw3C)~>RKR7zTxi>vmX>+1>-ba7lpHRrAnvgfJk_bkGfbn5jpugTNxQO9|Vk&KS6RC zu5-ilrTeH-%&UqUL=59ts1X(Xky9$e12b=mI!e#gzt_KEM7m$x?Lqrgd1ZH(oAN7- zRx2AT_2R8S-;up-r`Y8@>wZ)Qmw9f(&%LjnzOa{j5@CAi_Pi^3unpIKgG8we^*_1S>`-WnbnUqg$&FKXsYj(od#OO>PAE9kf%3=`c; zrPtC!CctpY)pK6TeN4}~t%21dLn*nWxL?W`d`YP$4}@|uV`t}e-KWIo0gDX|hm6x- zLWx8Fn4OePd>}r(S}n?!LFz%@EApYq*MSW|HS`OtSJE_VW3etTcpVL!c8tb_wU3Ty z5ETx%>HY8LhR6wX)`h_B2jtChla8)m72~DFe;3ow_;Zbb+u??vqw0)~wjf7C zyr4+ph@Z}Q;Y%-(@o@KRHp_yQTCjM44}S=GYb_y$YS)5h4Sx zn)wSCFwB1SpdB0YJ-%NT)D>L4iqjR9#>Glg=0gxSVnU12iBR?l=ssh2?^l7YQkWs? zyAZ;fhU1h}dgon*xI?3v|5#D7b{|P)Ub$kFdCJ%1vG(HER*@HGil@%+8oOvd82*06 zO01lek2bS%3nSI5@USmIk^a*a6x(yG{adSx7t4ttt^}~dyynJgufgJ)5p5{aj)v12 z?eJbd;p~CfW55A^lID?RZ&1eX1v2E+1#J3?Rx%K%A`6*QIFo*>zk`owxaEoE9zCA7t)Ky)GW#%Ra?(m8>BnhFWNO7Isr9wem%M#ha) zUW>YPi!ikPz2Pml2^cAH|id`lpwDmle*ievVnTz!?l`5Jq5UAW@o zktVH5CSRdVX>TzT%L&F%GVU+fvWRQ1nU`YInNa$=WjIqHD;MLbtr*E`hzb8yF}cWa z-r7%eV07qcpSpdzmEML@&?prNRCj~-6l-Dl^h)j3CmQ?G<7HM-tl<)$xBXdF1e98j znPTm!#{w(*ap@aGL;UpBO>hs+*b8!>3_a};=E-AiULBY=r>Z-hl?Lewi9z1epQG<@ zyzk(Orc%4UTAun^Z@0a)j3n{0*H3e!KBKYFcOHA`C7U-fsY?x~#j)(GCaRIao1(5b z;v;PT!lM`z2^Vo(y1VwT<)ex5&?=jo-TAiISc31UGtQDdF6bCs``Z%UIcBUBcC|pM*k+UW|;VpO{4=LMUS00~P`Vkt*>|n|hJ16w%0Y zKTK2$X4mPwF;(s($|VANPy6ue`5S;4?s|#M<2WON_Lttbn9R#;AH7R5KsdGqYn)I^ z)^6xlqF=F$UNAUA2=0fkkmO0)R7n!Zb}TA5qS;3x#3$`yGV|XIZj^dEFX7IFZco+j zT^X<<;$HL$^z)c;us845?){w?|LH$>g(``GVaL|P!CpyYnqb;`qbq-!X7hDkTe%YMVi2!tKg`nG@Y7nNUZZyhe)5}|IK}93x0H&^L0@l z_?_;L@0;(egnD61$-)ZVi^7U&kZkubr|vtUgd6Bn>EAH7<|ojuQU25}lE0)hrju$b z6(Oejub~a}+?RYdv91$#CWC{XPxXGN``I9^8H&g~X(|m>@Spu`-PZ#eAyBJmDBa4S z$lG(|Hd}6X%Dj|X=?3Z#h9~5h%N$5{txa9-y4}FcoM~#)Ti)HXZeig=m&Z)y_heL!M0dTyJlFcy!|m%b{|q+ za{T?2;Oe~^X|YSQ`fKb#T7Fy8DGYcciDY!&4vV8_3!AQ~7H;@z$TfP=!x_#ZKTvVc z&#fG<8Q}8zyZbMkEu{{6qS@(@tUkon0Tk`GnAI$Q3|=~bt1?ohCsYHuCB`Q_^bMIxkgX44gsOHG6;1PG~cg@ORfH}6Oiy-OnH`| znR#dDYK=3KPW?SZt~(8WTB!a`3CUF%MXNPAD>i8TnOO zqx1Oj-e(FZo!>pyl=GI7DrS^@dHAUSiZ5g4QKt@gRTCs-G`yF}{0=BL`ChPhyN2$M zpd9P|rqr~mc7Ui7O08j=W!PbsA2`79OGD%?VR$J0*-tyhPYJgD&GwWtjgn|3HZsoEbRh`ffy z<6x23HEXAG)Qg{1n#O|LYUwxIi^`fa-7gk7Bc>Te^b(A^S@cLm#a0t9Wy=yYu$Ig5 z{OYHtr~+9qc$Re)ghS9#CMwuFLTgIvRhzC#q5_}n@USU%t&`0%2 z5pUFEkbZ0!Q>xm%KIiNbJ=eeYHlC$->=7;CK#N#e?7X_soSx_+kUhZ4MrZRQP_GOk zK^UQW6micnR&QQ5F&i8l6)RXG>CzI0Rse9?LozzTIU^^6&4l zILIk!hQAs8qZkfd`8!RD~xhNR8k^;9Jx^#k2hrNm{UQ39>BJpCPZRs~^QS%^! zXeq;`3-RA_htkYFf?1ULRC6`ET)2{*Ax_upkORDO!>N7Js-G8!c3HKic@gb^__uqN zrMmAu(0d~Z|Gxi}vF>YKYQ>Q@;?nXCbgn5Xh!HVZ=4ud(l_T{SZB%SCs-nA+mQ4Gj z@f<;6s=P_1HfyZRra8?zy}Rb(yI>%AXr^T_`qgM#8^f2lxJ|<=WeEl2b2Hb^N4*I; zlgA0Mb@R~-7_MazvQq<_=arjeB)>pN+qMbM2XwiIqSCZ^izk34j*t!!Lgqdoab|`T z@~u@cwkioZ3MXvHkAOGcNVhCk^r)2YBaM@SeRo7R#?l)1X!(hMH>tK4K6)>G3%xC8J=5={@}1b7k!I^x zGk7b7zswV)dh_#&8oAigkC-%b4YH)Lbng5)DIawTnabm+iW_n||fF z3>b@=yG5mUMQdR2u*>O%Mt;hwQ_D~9M*j?NuN8X;+P!4Ge|e$?th9ydMh+ReddjwdEr|8Vf#zAL8}kKm|IYY z&4PwumLKIE7K{2uRs+zzRlh4Jua4FW7^)2ud(4kER4%R3wwrZ8g^~hn)pM(?0Z$SVPDR`i5hG8 z!tF%qA%@tOeyUwlvZdCvYjxSFL4JCiq4~|Ui>b6m8=jQp>{AbOC>nD&7SzC~YeJz+ z=BnC9{npu=SnI}EKe1^EKXd9-%I7S1(J4zCSDOy3Hn?PlAbS>i{W1OPJRwq! z7Ve*jh?NvSTfcN>Cszs(JwV1s=ui12_X(T9lR}FODPM@)^fVu3k`}Yq3v67xdG>s( zA$L?%qrJHP{c<4|TE(83w7~%*sh`k>bDkiunc21cm;~2ijfLQAZq|`=GaUaTQvIbde=XnpnPrDwx4J* zHw)hnr%6Z(Y5nG?!tQ{=4iBLTk_v0g1dJD=qT-*qk*6}x&cwC<-b)iOzOGT7&@=M; zK!B(-BycJ+Ke7KyP+e8E1dnpF0$4b5>5+%wrA0qSsRh5)QO_ZO6bRe4+&Q(9-Fw^- zb!5MM!}wcjNSWFB8+@~qF!^=X;pQzhI>7t8V?^kF(aI{fh-VPkG=jgy7^15`BTl8p z5QtG_vwPJh7{*#-nowXWTjf`glF)FegkKS?QtQi=Ir+-E6+06e9Nb$&Q;}lP4>|2S zK8wZITbw0Iy#mdCEB~m_u5+6IPH+6%(31>7mdM6tgPmsp4v^$C$A4jkrb9?NUcZ; z#L=>so#r4BT+B6}TH1KdV#e4K$(Sz5Ob2sNPvn`PTB0^l{~ze=#S5ecCq zqynuK|FKvBx=!It3^y##7x1ex7T%?6SZ#l3Q>0n1DtR%l)bJD;JuS@^I@7%aa(2=cjQ2rmy{|Q+Z4p zGujvO2kXH`@s5@x=uQ&HzQqE$*Ba}U0XRpG)yrRoK??fZlb9LVK z^WG#I?NDxoyMfL7nzx5$$0w)7DP5aYND3l&oTKZ&v3u%6hqpXRgOCk3gsM%@55uP- z=E#gX-jE;5KaslMbU$$KBp=>9GCUEb;$G*SYQ{}@7=0@xumo!nJEp=MjO_2hvP7fA zdR(1#j_Zd2(cCg`Qhbpyk#75gE@;g}d(xu$T~M`u>nqRgZmf7TP^f+j>E3DpHlDK_s3TZ19xMqjcb@0o}kVr5sv3AS1r8?;GL7h@s6C< zn-M3-iV%NMz`jbRRwXWz28s8m(D8M4N-zyMi!b>{jc%G3;DM)N)8G|mf4Go(u9`bpB#L~A6nJEt`oQm(G#yt(QsD6FO4sI0#(v8& z_cp5a;Hah&iZUX)As~cC=wss}piey?DP|>AT+aQ1B~Oa%9k1*4px_>yIn@8^$o}^u2*) z9``#8!_}C(KU0TJgebM&#h3QefL0ADn+W%eBs2ZwM(G3G@)Bp6LL0&4LVU3zsguVe zrBuOFV_Z4fBfCq9tD55_!;%8ZI~Y5AJijs{j`HOkdST&b{o( zHLiv{d=o{dq+^J1jZOpE^DmBGcEwV=g8gz4d6->_p=2`fyx+kCSKIWj)}tbe<9 zTB+jc5`&!7!JK|EJ^2dgHe}T%no;gR2li%f_AuPWM@dxvz4L4pkM&KFM!pfFp+5$- zpc8)YLH#?AgL02U_uI-X<@u}V!|k~zf#E4e`i~t7;TUJ-MxW6!-_Qtg2wot7WkxnC z%fER|RT*q;{$(RfVO<_=LwNB`t90k5%dCkFM%Ln4;_7?l#lfmYtA_HewPUoW+=h@7 z?vyA4yDM!r(~WCLE&KaZ z#Ur~DKSXJe%k+IXjn80&FWN%``5{a5c0dd7DE&&YrBR~R5_W5AYEe&jvHN!@iSG0U zGOIjO?m}xy?X)VhlSBeq;rcY#3cKA6-V{tL|dWr(ES3X-3Ne0gzl( zE|?>@!!hOZ;D;OUtQ$rj+Gxl#Wq-Zmj^_g{EiJETW)j72+mo%e)$Wk-n^1t@ZYqByN4=FH8lDfELUG%q> zrPV23xcIep@fv`fIuxC{bNOQy!ATFdT7~QMxJb-yqgc?#eJ{Degicc4fxt;EW=G8< zulnoFE(^ivc0gxz;x<|%%RFCNWB#^o(0U?oJ_j)(ToZjXewZS35Gg^9VMy!!#h8*V zqu#CBiesFg==!?9fr-bbgjLRs?>1c=?d`h`o6v(5XkTGlB2_yBDSvnf;M=RR9bIv$ zjt%NAWgdYl^%g@$2Z6ha&|P@ICPs$Ni;Vcrt{{> z$HTFqN8Xi1_ALG@LYa`o)t?NU!yGNYjx23y-TjS3CTeFPDI`FH?6P!JL*Eg~Tc#)u zmjYM@(C`PZN)z)3#ai@{QFoPVeOq#I;qxvD%z9TtY(|GN9=?H*tH3F(*hbgMbS6a0 zBnw_^;b3flZ3^T)4r+Ief$tYsWc``fdWW%_FL!lX^eM#m*530lw0{WpDMeJnx5Rsj z^F$k)tRZOTDAq``Pw7)@*Wu1Y@;d;o1Nu9ha^?WbC82{};gLotsME}|3YgXD52Dn< zUB2wn&ttSC7_GbkH_>THyLxNdrLLj$M49j+18h^dC%Pxs?KCM4Siu}4w<*5a7q{-N z+QiTh{VLap^0X;vZr0w|JCSZCUHtd)pB{xgZ^G? zd{YEJiLeCt=aX1mQi3lOmZ9bmmkhlMt23?5!WEuIusaI!skx_Cm0x2FbJuifG|wfU zIVFF;*jB4PJIA$ktinX-de~6ItSr|F@@#`i%M^Dj{Mb0Z+v$;v4_|V2MQd?60jNKV zSkHFdZ&H6Gj5Q#VpJ`tX$WD8?6n=AUhq$}tXgM4~-1K_6GTN?x7j7OdUx|Q@+FD22 zFURfQD<&jUi(ICC&`>YG<{ZtXm*8A&AfSGmb^;cZYeZYd&LhD#z12;C)M% zrgo3r{TI>3x#QJmNd5;Y>{zT??$)l78QcDmtj0p(o=*(kJ>)EV{d7!# zQl7|eb)u5Y3oZewZr6R=OO_}|byz=^y=!uY7BaMdpYtu@5%oNm9PMKTttp^X=C3K; z3sUz>)-;Fn@q}bI!|0SV2iGDrVyhW_P(4fu<SWZ=iNT-DtFC@C8UT+1h)M zyL)7-#LrsENjMg#+F#MjmRmL3crr0^6*C5Q1*(Vu)7d;%&9+wKG*FT;%0A8i)!29F zn(RDUcunW>;>9X6g$K85P`3jcC#N^F6gnKHEWKXwA}|#8nvSF~8m;)JxC2-%nA0`- z{$U{fA;8AniR7PZv{Lo=qew2AsU=?XYnLfPQIl0Rvr6$>90lEnt@z!7yk?{rFAXJ6 zp7~=#Z`v|le10KwS7vXe zFEY=ujalf!wNd(_g|Vg>BL`;;ngi3)-I)`&$c@vUiIVYhAq`zf%FS=pd6&wW-x1k< zv#^VLuh;T44D{7AyiG4agl9`E==6kLI-^=`M)p-VrjFFgxq2^vEXgf3>s9+-S5X1= zmPA^WIti;IT+_xM#s8$s?UE;8b=AUYHX5d{^(im8XPSYB4`~i(pBaQV-iC*N@o2ic z=ch&n=q6byiDD^))rHG2>>XNq1TtV1@qQpsFW_=NBCQ*B*0xywhR=9)b;S^g2LSl! zl;1Q|{Vlo5#IV`S_c&ER5ItDB%WdRa*$03z;QYB_7!xoJ=I@^{iSSuI@j0bf2C<&N z?o88jN#CxA9<>B5RJ=sREQHe9_0rSsz*s*HzRN zk4@Fr)2Gk~gV`Gqw$|8ryn-_+0T-`?82O&*l`N2NB}KkpTIqkM7xO(u>^`><#X?K| ziW2+LaD3`VX^){cTWc~7BH*(RLT94W1p6{~YYRLtO}9S}pX*kV$pC<9G<1|10FAIm z{itDez0?^zZ|%~9MJomX$RbFHkJI1li4~3rGn+OA0Y9qw00633`LdOUHMEAd@Wn%D&n!krz`=esD z%~*)P9|1gJRWRO-P-eFN2dj~f-V~(dN|R0u2gC^{xv<8V(+rkfKH*TMfDa+pKj3U# zT)1+YbU@2bZV|co`Vd$re8U2mriWix5-@GUfcC-P@8EMbK(&IEO7kNeAJrO2Uh#)8 zjq^%=J)Gu?9v({Osu+1c&rQ%nb%#m~=l3=s!20oc~m)4qkqoJ1qnu_#@U18V3HhWaMH1;QsUlEmuFIOFv&Bw_&-U+ z|3O6lFEO0G3jh5diOA2~*ng3k|Ib9^|2wM5C?AbKzX13OVvTci430m4hn$qMWVN_S G@c#nLt(Erx literal 0 HcmV?d00001 From a0eb149df5b722bfd43cf3587399c118850af76c Mon Sep 17 00:00:00 2001 From: fritzlitester Date: Tue, 4 Feb 2020 15:08:36 +0100 Subject: [PATCH 57/72] Fix query parameter (#5131) * fix map as query parameter, use RequestPart instead of RequestParam in FormParams, add filename for parameters of type file * fix brace * fix tests * run bin/windows bat files * test if this solves linending problem part 1 * test if this solves linending problem part 2 * test if this solves linending problem part 3 * test if this solves linending problem part 4 * test if this solves linending problem part 5 * test if this solves linending problem part 6 * manually set back version in pom * update spring samples Co-authored-by: William Cheng --- .../resources/JavaSpring/formParams.mustache | 2 +- .../resources/JavaSpring/queryParams.mustache | 2 +- .../java/spring/SpringCodegenTest.java | 4 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java-pkmst/.openapi-generator/VERSION | 2 +- .../com/prokarma/pkmst/controller/PetApi.java | 2 +- .../prokarma/pkmst/controller/StoreApi.java | 2 +- .../prokarma/pkmst/controller/UserApi.java | 2 +- .../async/.openapi-generator/VERSION | 2 +- .../server/api/model/Category.java | 2 +- .../server/api/model/ModelApiResponse.java | 2 +- .../openapitools/server/api/model/Order.java | 2 +- .../openapitools/server/api/model/Pet.java | 4 +- .../openapitools/server/api/model/Tag.java | 2 +- .../openapitools/server/api/model/User.java | 2 +- .../server/api/verticle/PetApi.java | 4 +- .../server/api/verticle/PetApiVerticle.java | 20 +- .../server/api/verticle/StoreApi.java | 2 +- .../server/api/verticle/StoreApiVerticle.java | 10 +- .../server/api/verticle/UserApi.java | 8 +- .../server/api/verticle/UserApiVerticle.java | 44 +- .../async/src/main/resources/openapi.json | 791 +++++++++--------- .../java-vertx/rx/.openapi-generator/VERSION | 2 +- .../server/api/model/Category.java | 6 +- .../server/api/model/ModelApiResponse.java | 8 +- .../openapitools/server/api/model/Order.java | 12 +- .../openapitools/server/api/model/Pet.java | 10 +- .../openapitools/server/api/model/Tag.java | 6 +- .../openapitools/server/api/model/User.java | 18 +- .../server/api/verticle/PetApi.java | 4 +- .../server/api/verticle/PetApiVerticle.java | 20 +- .../server/api/verticle/StoreApi.java | 2 +- .../server/api/verticle/StoreApiVerticle.java | 10 +- .../server/api/verticle/UserApi.java | 8 +- .../server/api/verticle/UserApiVerticle.java | 44 +- .../rx/src/main/resources/openapi.json | 791 +++++++++--------- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../openapitools/api/FakeApiController.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../openapitools/api/PetApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../openapitools/api/FakeApiController.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../openapitools/api/PetApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../openapitools/api/FakeApiController.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../openapitools/api/PetApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../openapitools/virtualan/api/FakeApi.java | 8 +- .../openapitools/virtualan/api/PetApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 8 +- .../java/org/openapitools/api/PetApi.java | 4 +- 64 files changed, 1019 insertions(+), 1005 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache index 14d94bfb312c..1f4a1b2395af 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}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("{{baseName}}") {{#isListContainer}}List<{{/isListContainer}}MultipartFile{{#isListContainer}}>{{/isListContainer}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) @RequestPart(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}") {{#isListContainer}}List<{{/isListContainer}}MultipartFile{{#isListContainer}}>{{/isListContainer}} {{baseName}}{{/isFile}}{{/isFormParam}} \ 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 bb173eef7e4e..0f79dd06de5f 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}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/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}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMapContainer}}""{{/isMapContainer}}{{^isMapContainer}}"{{baseName}}"{{/isMapContainer}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue={{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/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 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 af07607a4f1b..8ea8f5de99d2 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 @@ -282,7 +282,7 @@ public void testMultipartBoot() throws IOException { final String multipartArrayApi = files.get("/src/main/java/org/openapitools/api/MultipartArrayApi.java"); Assert.assertTrue(multipartArrayApi.contains("List files")); Assert.assertTrue(multipartArrayApi.contains("@ApiParam(value = \"Many files\")")); - Assert.assertTrue(multipartArrayApi.contains("@RequestPart(\"files\")")); + Assert.assertTrue(multipartArrayApi.contains("@RequestPart(value = \"files\")")); // Check that the delegate handles the single file final String multipartSingleApiDelegate = files.get("/src/main/java/org/openapitools/api/MultipartSingleApiDelegate.java"); @@ -292,7 +292,7 @@ public void testMultipartBoot() throws IOException { final String multipartSingleApi = files.get("/src/main/java/org/openapitools/api/MultipartSingleApi.java"); Assert.assertTrue(multipartSingleApi.contains("MultipartFile file")); Assert.assertTrue(multipartSingleApi.contains("@ApiParam(value = \"One file\")")); - Assert.assertTrue(multipartSingleApi.contains("@RequestPart(\"file\")")); + Assert.assertTrue(multipartSingleApi.contains("@RequestPart(value = \"file\")")); } @Test 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 7001a3fb2a64..23f413e18a23 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 @@ -249,7 +249,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded", method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -275,7 +275,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = "application/json", consumes = "multipart/form-data", method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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/java-pkmst/.openapi-generator/VERSION b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION +++ b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java index ec1b2c40b725..460fd505765c 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java index c3d12f4e9c1c..d797135e85e8 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java index 74634432fb40..052d1e0ec067 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.2-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.3-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION index d077ffb477a4..58592f031f65 100644 --- a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.4-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java index 2fdf0df82dae..f05201c45add 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java @@ -7,7 +7,7 @@ /** * A category for a pet **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Category { private Long id; diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java index c6f2ba4ebd47..934a6efdf966 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java @@ -7,7 +7,7 @@ /** * Describes the result of uploading an image resource **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class ModelApiResponse { private Integer code; diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java index 4fa04b8e0a91..0d8d6714212c 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java @@ -9,7 +9,7 @@ /** * An order for a pets from the pet store **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Order { private Long id; diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java index abc6feb302d2..cb9325acf5db 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java @@ -12,11 +12,11 @@ /** * A pet for sale in the pet store **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Pet { private Long id; - private Category category = null; + private Category category; private String name; private List photoUrls = new ArrayList<>(); private List tags = new ArrayList<>(); diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java index 660b1d3bb074..0389c2fbeea8 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java @@ -7,7 +7,7 @@ /** * A tag for a pet **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Tag { private Long id; diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java index c30e9eb84a8d..0e1e87555552 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java @@ -7,7 +7,7 @@ /** * A User who is purchasing from the pet store **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class User { private Long id; diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java index 28a9e6e3d24c..7ec2b40b8ff3 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java @@ -13,7 +13,7 @@ public interface PetApi { //addPet - void addPet(Pet pet, Handler> handler); + void addPet(Pet body, Handler> handler); //deletePet void deletePet(Long petId, String apiKey, Handler> handler); @@ -28,7 +28,7 @@ public interface PetApi { void getPetById(Long petId, Handler> handler); //updatePet - void updatePet(Pet pet, Handler> handler); + void updatePet(Pet body, Handler> handler); //updatePetWithForm void updatePetWithForm(Long petId, String name, String status, Handler> handler); diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java index e2aabfc65105..4b3aa4cfb384 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java @@ -48,13 +48,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "addPet"; - JsonObject petParam = message.body().getJsonObject("Pet"); - if (petParam == null) { - manageError(message, new MainApiException(400, "Pet is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - Pet pet = Json.mapper.readValue(petParam.encode(), Pet.class); - service.addPet(pet, result -> { + Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); + service.addPet(body, result -> { if (result.succeeded()) message.reply(null); else { @@ -177,13 +177,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "updatePet"; - JsonObject petParam = message.body().getJsonObject("Pet"); - if (petParam == null) { - manageError(message, new MainApiException(400, "Pet is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - Pet pet = Json.mapper.readValue(petParam.encode(), Pet.class); - service.updatePet(pet, result -> { + Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); + service.updatePet(body, result -> { if (result.succeeded()) message.reply(null); else { diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java index 1f348fa57a47..656978f999b8 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java @@ -20,6 +20,6 @@ public interface StoreApi { void getOrderById(Long orderId, Handler> handler); //placeOrder - void placeOrder(Order order, Handler> handler); + void placeOrder(Order body, Handler> handler); } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java index ebe4670ddc35..f83133b94b45 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java @@ -111,13 +111,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "placeOrder"; - JsonObject orderParam = message.body().getJsonObject("Order"); - if (orderParam == null) { - manageError(message, new MainApiException(400, "Order is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - Order order = Json.mapper.readValue(orderParam.encode(), Order.class); - service.placeOrder(order, result -> { + Order body = Json.mapper.readValue(bodyParam.encode(), Order.class); + service.placeOrder(body, result -> { if (result.succeeded()) message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); else { diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java index bb114d2c704b..28f23b1501b3 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java @@ -11,13 +11,13 @@ public interface UserApi { //createUser - void createUser(User user, Handler> handler); + void createUser(User body, Handler> handler); //createUsersWithArrayInput - void createUsersWithArrayInput(List user, Handler> handler); + void createUsersWithArrayInput(List body, Handler> handler); //createUsersWithListInput - void createUsersWithListInput(List user, Handler> handler); + void createUsersWithListInput(List body, Handler> handler); //deleteUser void deleteUser(String username, Handler> handler); @@ -32,6 +32,6 @@ public interface UserApi { void logoutUser(Handler> handler); //updateUser - void updateUser(String username, User user, Handler> handler); + void updateUser(String username, User body, Handler> handler); } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java index a356f37a6743..8773908b5a0a 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java @@ -46,13 +46,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "createUser"; - JsonObject userParam = message.body().getJsonObject("User"); - if (userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - User user = Json.mapper.readValue(userParam.encode(), User.class); - service.createUser(user, result -> { + User body = Json.mapper.readValue(bodyParam.encode(), User.class); + service.createUser(body, result -> { if (result.succeeded()) message.reply(null); else { @@ -71,14 +71,14 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "createUsersWithArrayInput"; - JsonArray userParam = message.body().getJsonArray("User"); - if(userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonArray bodyParam = message.body().getJsonArray("body"); + if(bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - List user = Json.mapper.readValue(userParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, List.class)); - service.createUsersWithArrayInput(user, result -> { + List body = Json.mapper.readValue(bodyParam.encode(), + Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); + service.createUsersWithArrayInput(body, result -> { if (result.succeeded()) message.reply(null); else { @@ -97,14 +97,14 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "createUsersWithListInput"; - JsonArray userParam = message.body().getJsonArray("User"); - if(userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonArray bodyParam = message.body().getJsonArray("body"); + if(bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - List user = Json.mapper.readValue(userParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, List.class)); - service.createUsersWithListInput(user, result -> { + List body = Json.mapper.readValue(bodyParam.encode(), + Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); + service.createUsersWithListInput(body, result -> { if (result.succeeded()) message.reply(null); else { @@ -229,13 +229,13 @@ public void start() throws Exception { return; } String username = usernameParam; - JsonObject userParam = message.body().getJsonObject("User"); - if (userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - User user = Json.mapper.readValue(userParam.encode(), User.class); - service.updateUser(username, user, result -> { + User body = Json.mapper.readValue(bodyParam.encode(), User.class); + service.updateUser(username, body, result -> { if (result.succeeded()) message.reply(null); else { diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json index ab379a276b7c..2f40e269947a 100644 --- a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json @@ -1,35 +1,32 @@ { "openapi" : "3.0.1", "info" : { - "title" : "OpenAPI Petstore", "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" : [ { - "name" : "pet", - "description" : "Everything about your Pets" + "description" : "Everything about your Pets", + "name" : "pet" }, { - "name" : "store", - "description" : "Access to Petstore orders" + "description" : "Access to Petstore orders", + "name" : "store" }, { - "name" : "user", - "description" : "Operations about user" + "description" : "Operations about user", + "name" : "user" } ], "paths" : { "/pet" : { - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "operationId" : "updatePet", + "post" : { + "operationId" : "addPet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -42,36 +39,29 @@ } } }, + "description" : "Pet object that needs to be added to the store", "required" : true }, "responses" : { - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Pet not found", - "content" : { } - }, "405" : { - "description" : "Validation exception", - "content" : { } + "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-serviceid" : "updatePet", - "x-serviceid-varname" : "UPDATEPET_SERVICE_ID" + "x-serviceid" : "addPet", + "x-serviceid-varname" : "ADDPET_SERVICE_ID" }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "operationId" : "addPet", + "put" : { + "operationId" : "updatePet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -84,75 +74,87 @@ } } }, + "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" : { - "description" : "Invalid input", - "content" : { } + "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-serviceid" : "addPet", - "x-serviceid-varname" : "ADDPET_SERVICE_ID" + "x-serviceid" : "updatePet", + "x-serviceid-varname" : "UPDATEPET_SERVICE_ID" } }, "/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, + "in" : "query", + "name" : "status", + "required" : true, "schema" : { - "type" : "array", "items" : { - "type" : "string", "default" : "available", - "enum" : [ "available", "pending", "sold" ] - } - } + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid status value", - "content" : { } + "content" : { }, + "description" : "Invalid status value" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], + "summary" : "Finds Pets by status", + "tags" : [ "pet" ], "x-accepts" : "application/json", "x-serviceid" : "findPetsByStatus", "x-serviceid-varname" : "FINDPETSBYSTATUS_SERVICE_ID" @@ -160,79 +162,109 @@ }, "/pet/findByTags" : { "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", + "deprecated" : true, "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, + "in" : "query", + "name" : "tags", + "required" : true, "schema" : { - "type" : "array", "items" : { "type" : "string" - } - } + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid tag value", - "content" : { } + "content" : { }, + "description" : "Invalid tag value" } }, - "deprecated" : true, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], + "summary" : "Finds Pets by tags", + "tags" : [ "pet" ], "x-accepts" : "application/json", "x-serviceid" : "findPetsByTags", "x-serviceid-varname" : "FINDPETSBYTAGS_SERVICE_ID" } }, "/pet/{petId}" : { - "get" : { + "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" : { + "400" : { + "content" : { }, + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Deletes a pet", "tags" : [ "pet" ], - "summary" : "Find pet by ID", + "x-accepts" : "application/json", + "x-serviceid" : "deletePet", + "x-serviceid-varname" : "DELETEPET_SERVICE_ID" + }, + "get" : { "description" : "Returns a single pet", "operationId" : "getPetById", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to return", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -244,36 +276,37 @@ "$ref" : "#/components/schemas/Pet" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Pet not found", - "content" : { } + "content" : { }, + "description" : "Pet not found" } }, "security" : [ { "api_key" : [ ] } ], + "summary" : "Find pet by ID", + "tags" : [ "pet" ], "x-accepts" : "application/json", "x-serviceid" : "getPetById", "x-serviceid-varname" : "GETPETBYID_SERVICE_ID" }, "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", "operationId" : "updatePetWithForm", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet that needs to be updated", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -282,12 +315,12 @@ "schema" : { "properties" : { "name" : { - "type" : "string", - "description" : "Updated name of the pet" + "description" : "Updated name of the pet", + "type" : "string" }, "status" : { - "type" : "string", - "description" : "Updated status of the pet" + "description" : "Updated status of the pet", + "type" : "string" } } } @@ -296,65 +329,32 @@ }, "responses" : { "405" : { - "description" : "Invalid input", - "content" : { } + "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-serviceid" : "updatePetWithForm", "x-serviceid-varname" : "UPDATEPETWITHFORM_SERVICE_ID" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "operationId" : "deletePet", - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "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", - "content" : { } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-accepts" : "application/json", - "x-serviceid" : "deletePet", - "x-serviceid-varname" : "DELETEPET_SERVICE_ID" } }, "/pet/{petId}/uploadImage" : { "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", "operationId" : "uploadFile", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to update", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -363,13 +363,13 @@ "schema" : { "properties" : { "additionalMetadata" : { - "type" : "string", - "description" : "Additional data to pass to server" + "description" : "Additional data to pass to server", + "type" : "string" }, "file" : { - "type" : "string", "description" : "file to upload", - "format" : "binary" + "format" : "binary", + "type" : "string" } } } @@ -378,19 +378,21 @@ }, "responses" : { "200" : { - "description" : "successful operation", "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-serviceid" : "uploadFile", @@ -399,29 +401,29 @@ }, "/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" - } + "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-serviceid" : "getInventory", "x-serviceid-varname" : "GETINVENTORY_SERVICE_ID" @@ -429,11 +431,8 @@ }, "/store/order" : { "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", "operationId" : "placeOrder", "requestBody" : { - "description" : "order placed for purchasing the pet", "content" : { "*/*" : { "schema" : { @@ -441,11 +440,11 @@ } } }, + "description" : "order placed for purchasing the pet", "required" : true }, "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -457,13 +456,17 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid Order", - "content" : { } + "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-serviceid" : "placeOrder", @@ -471,26 +474,51 @@ } }, "/store/order/{orderId}" : { - "get" : { + "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" : "orderId", + "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" ], - "summary" : "Find purchase order by ID", + "x-accepts" : "application/json", + "x-serviceid" : "deleteOrder", + "x-serviceid-varname" : "DELETEORDER_SERVICE_ID" + }, + "get" : { "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", "operationId" : "getOrderById", "parameters" : [ { - "name" : "orderId", - "in" : "path", "description" : "ID of pet that needs to be fetched", + "in" : "path", + "name" : "orderId", "required" : true, "schema" : { + "format" : "int64", "maximum" : 5, "minimum" : 1, - "type" : "integer", - "format" : "int64" + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -502,58 +530,30 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Order not found", - "content" : { } + "content" : { }, + "description" : "Order not found" } }, + "summary" : "Find purchase order by ID", + "tags" : [ "store" ], "x-accepts" : "application/json", "x-serviceid" : "getOrderById", "x-serviceid-varname" : "GETORDERBYID_SERVICE_ID" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Order not found", - "content" : { } - } - }, - "x-accepts" : "application/json", - "x-serviceid" : "deleteOrder", - "x-serviceid-varname" : "DELETEORDER_SERVICE_ID" } }, "/user" : { "post" : { - "tags" : [ "user" ], - "summary" : "Create user", "description" : "This can only be done by the logged in user.", "operationId" : "createUser", "requestBody" : { - "description" : "Created user object", "content" : { "*/*" : { "schema" : { @@ -561,15 +561,19 @@ } } }, + "description" : "Created user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, - "x-contentType" : "*/*", + "summary" : "Create user", + "tags" : [ "user" ], + "x-codegen-request-body-name" : "body", + "x-contentType" : "*/*", "x-accepts" : "application/json", "x-serviceid" : "createUser", "x-serviceid-varname" : "CREATEUSER_SERVICE_ID" @@ -577,29 +581,30 @@ }, "/user/createWithArray" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithArrayInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "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-serviceid" : "createUsersWithArrayInput", @@ -608,29 +613,30 @@ }, "/user/createWithList" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithListInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "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-serviceid" : "createUsersWithListInput", @@ -639,21 +645,19 @@ }, "/user/login" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", "operationId" : "loginUser", "parameters" : [ { - "name" : "username", - "in" : "query", "description" : "The user name for login", + "in" : "query", + "name" : "username", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "password", - "in" : "query", "description" : "The password for login in clear text", + "in" : "query", + "name" : "password", "required" : true, "schema" : { "type" : "string" @@ -661,41 +665,43 @@ } ], "responses" : { "200" : { - "description" : "successful operation", - "headers" : { - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", + "content" : { + "application/xml" : { "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, - "X-Expires-After" : { - "description" : "date in UTC when toekn expires", + "application/json" : { "schema" : { - "type" : "string", - "format" : "date-time" + "type" : "string" } } }, - "content" : { - "application/xml" : { + "description" : "successful operation", + "headers" : { + "X-Rate-Limit" : { + "description" : "calls per hour allowed by the user", "schema" : { - "type" : "string" + "format" : "int32", + "type" : "integer" } }, - "application/json" : { + "X-Expires-After" : { + "description" : "date in UTC when toekn expires", "schema" : { + "format" : "date-time", "type" : "string" } } } }, "400" : { - "description" : "Invalid username/password supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username/password supplied" } }, + "summary" : "Logs user into the system", + "tags" : [ "user" ], "x-accepts" : "application/json", "x-serviceid" : "loginUser", "x-serviceid-varname" : "LOGINUSER_SERVICE_ID" @@ -703,29 +709,55 @@ }, "/user/logout" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", "operationId" : "logoutUser", "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Logs out current logged in user session", + "tags" : [ "user" ], "x-accepts" : "application/json", "x-serviceid" : "logoutUser", "x-serviceid-varname" : "LOGOUTUSER_SERVICE_ID" } }, "/user/{username}" : { - "get" : { + "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" ], - "summary" : "Get user by user name", + "x-accepts" : "application/json", + "x-serviceid" : "deleteUser", + "x-serviceid-varname" : "DELETEUSER_SERVICE_ID" + }, + "get" : { "operationId" : "getUserByName", "parameters" : [ { - "name" : "username", - "in" : "path", "description" : "The name that needs to be fetched. Use user1 for testing.", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" @@ -733,7 +765,6 @@ } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -745,37 +776,37 @@ "$ref" : "#/components/schemas/User" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid username supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } }, + "summary" : "Get user by user name", + "tags" : [ "user" ], "x-accepts" : "application/json", "x-serviceid" : "getUserByName", "x-serviceid-varname" : "GETUSERBYNAME_SERVICE_ID" }, "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", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" } } ], "requestBody" : { - "description" : "Updated user object", "content" : { "*/*" : { "schema" : { @@ -783,126 +814,111 @@ } } }, + "description" : "Updated user object", "required" : true }, "responses" : { "400" : { - "description" : "Invalid user supplied", - "content" : { } + "content" : { }, + "description" : "Invalid user supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } }, + "summary" : "Updated user", + "tags" : [ "user" ], + "x-codegen-request-body-name" : "body", "x-contentType" : "*/*", "x-accepts" : "application/json", "x-serviceid" : "updateUser", "x-serviceid-varname" : "UPDATEUSER_SERVICE_ID" - }, - "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", - "content" : { } - }, - "404" : { - "description" : "User not found", - "content" : { } - } - }, - "x-accepts" : "application/json", - "x-serviceid" : "deleteUser", - "x-serviceid-varname" : "DELETEUSER_SERVICE_ID" } } }, "components" : { "schemas" : { "Order" : { - "title" : "Pet Order", - "type" : "object", + "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" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "petId" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "quantity" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "shipDate" : { - "type" : "string", - "format" : "date-time" + "format" : "date-time", + "type" : "string" }, "status" : { - "type" : "string", "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] + "enum" : [ "placed", "approved", "delivered" ], + "type" : "string" }, "complete" : { - "type" : "boolean", - "default" : false + "default" : false, + "type" : "boolean" } }, - "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" - }, + "title" : "Pet Order", + "type" : "object", "xml" : { "name" : "Order" } }, "Category" : { - "title" : "Pet category", - "type" : "object", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "name" : { "type" : "string" } }, - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, + "title" : "Pet category", + "type" : "object", "xml" : { "name" : "Category" } }, "User" : { - "title" : "a User", - "type" : "object", + "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" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "username" : { "type" : "string" @@ -923,118 +939,113 @@ "type" : "string" }, "userStatus" : { - "type" : "integer", "description" : "User Status", - "format" : "int32" + "format" : "int32", + "type" : "integer" } }, - "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" - }, + "title" : "a User", + "type" : "object", "xml" : { "name" : "User" } }, "Tag" : { - "title" : "Pet Tag", - "type" : "object", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "name" : { "type" : "string" } }, - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, + "title" : "Pet Tag", + "type" : "object", "xml" : { "name" : "Tag" } }, "Pet" : { - "title" : "a Pet", - "required" : [ "name", "photoUrls" ], - "type" : "object", + "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" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "category" : { "$ref" : "#/components/schemas/Category" }, "name" : { - "type" : "string", - "example" : "doggie" + "example" : "doggie", + "type" : "string" }, "photoUrls" : { + "items" : { + "type" : "string" + }, "type" : "array", "xml" : { "name" : "photoUrl", "wrapped" : true - }, - "items" : { - "type" : "string" } }, "tags" : { + "items" : { + "$ref" : "#/components/schemas/Tag" + }, "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" ] + "enum" : [ "available", "pending", "sold" ], + "type" : "string" } }, - "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" - }, + "required" : [ "name", "photoUrls" ], + "title" : "a Pet", + "type" : "object", "xml" : { "name" : "Pet" } }, "ApiResponse" : { - "title" : "An uploaded response", - "type" : "object", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + }, "properties" : { "code" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "type" : { "type" : "string" @@ -1043,17 +1054,12 @@ "type" : "string" } }, - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } + "title" : "An uploaded response", + "type" : "object" } }, "securitySchemes" : { "petstore_auth" : { - "type" : "oauth2", "flows" : { "implicit" : { "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", @@ -1062,12 +1068,13 @@ "read:pets" : "read your pets" } } - } + }, + "type" : "oauth2" }, "api_key" : { - "type" : "apiKey", + "in" : "header", "name" : "api_key", - "in" : "header" + "type" : "apiKey" } } } diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION index 4395ff592326..58592f031f65 100644 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION @@ -1 +1 @@ -3.2.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java index 58721d64cd37..f05201c45add 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java @@ -7,11 +7,11 @@ /** * A category for a pet **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Category { - private Long id = null; - private String name = null; + private Long id; + private String name; public Category () { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java index 60e1945bf1ad..934a6efdf966 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java @@ -7,12 +7,12 @@ /** * Describes the result of uploading an image resource **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class ModelApiResponse { - private Integer code = null; - private String type = null; - private String message = null; + private Integer code; + private String type; + private String message; public ModelApiResponse () { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java index f34e4c0ff4f6..0d8d6714212c 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java @@ -9,13 +9,13 @@ /** * An order for a pets from the pet store **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Order { - private Long id = null; - private Long petId = null; - private Integer quantity = null; - private OffsetDateTime shipDate = null; + private Long id; + private Long petId; + private Integer quantity; + private OffsetDateTime shipDate; public enum StatusEnum { @@ -36,7 +36,7 @@ public String toString() { } } - private StatusEnum status = null; + private StatusEnum status; private Boolean complete = false; public Order () { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java index be9ab39a4965..cb9325acf5db 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java @@ -12,12 +12,12 @@ /** * A pet for sale in the pet store **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Pet { - private Long id = null; - private Category category = null; - private String name = null; + private Long id; + private Category category; + private String name; private List photoUrls = new ArrayList<>(); private List tags = new ArrayList<>(); @@ -40,7 +40,7 @@ public String toString() { } } - private StatusEnum status = null; + private StatusEnum status; public Pet () { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java index acb51386a8fd..0389c2fbeea8 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java @@ -7,11 +7,11 @@ /** * A tag for a pet **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class Tag { - private Long id = null; - private String name = null; + private Long id; + private String name; public Tag () { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java index fedd3d6207ed..0e1e87555552 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java @@ -7,17 +7,17 @@ /** * A User who is purchasing from the pet store **/ -@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonInclude(JsonInclude.Include.NON_NULL) public class User { - private Long id = null; - private String username = null; - private String firstName = null; - private String lastName = null; - private String email = null; - private String password = null; - private String phone = null; - private Integer userStatus = null; + private Long id; + private String username; + private String firstName; + private String lastName; + private String email; + private String password; + private String phone; + private Integer userStatus; public User () { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java index ed8784f284ff..ae86f9bee709 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java @@ -13,7 +13,7 @@ public interface PetApi { //addPet - public Completable addPet(Pet pet); + public Completable addPet(Pet body); //deletePet public Completable deletePet(Long petId,String apiKey); @@ -28,7 +28,7 @@ public interface PetApi { public Single getPetById(Long petId); //updatePet - public Completable updatePet(Pet pet); + public Completable updatePet(Pet body); //updatePetWithForm public Completable updatePetWithForm(Long petId,String name,String status); diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java index 80f8a99f2e17..7caf45dfd249 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java @@ -48,13 +48,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "addPet"; - JsonObject petParam = message.body().getJsonObject("Pet"); - if (petParam == null) { - manageError(message, new MainApiException(400, "Pet is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - Pet pet = Json.mapper.readValue(petParam.encode(), Pet.class); - service.addPet(pet).subscribe( + Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); + service.addPet(body).subscribe( () -> { message.reply(null); }, @@ -172,13 +172,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "updatePet"; - JsonObject petParam = message.body().getJsonObject("Pet"); - if (petParam == null) { - manageError(message, new MainApiException(400, "Pet is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - Pet pet = Json.mapper.readValue(petParam.encode(), Pet.class); - service.updatePet(pet).subscribe( + Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); + service.updatePet(body).subscribe( () -> { message.reply(null); }, diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java index fd43dcbbdb50..8f9c735708bd 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java @@ -20,6 +20,6 @@ public interface StoreApi { public Single getOrderById(Long orderId); //placeOrder - public Single placeOrder(Order order); + public Single placeOrder(Order body); } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java index ced8cdcbb9a9..6e1a60becac3 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java @@ -108,13 +108,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "placeOrder"; - JsonObject orderParam = message.body().getJsonObject("Order"); - if (orderParam == null) { - manageError(message, new MainApiException(400, "Order is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - Order order = Json.mapper.readValue(orderParam.encode(), Order.class); - service.placeOrder(order).subscribe( + Order body = Json.mapper.readValue(bodyParam.encode(), Order.class); + service.placeOrder(body).subscribe( result -> { message.reply(new JsonObject(Json.encode(result)).encodePrettily()); }, diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java index 20ddbbb5331c..cc6be61055cd 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java @@ -11,13 +11,13 @@ public interface UserApi { //createUser - public Completable createUser(User user); + public Completable createUser(User body); //createUsersWithArrayInput - public Completable createUsersWithArrayInput(List user); + public Completable createUsersWithArrayInput(List body); //createUsersWithListInput - public Completable createUsersWithListInput(List user); + public Completable createUsersWithListInput(List body); //deleteUser public Completable deleteUser(String username); @@ -32,6 +32,6 @@ public interface UserApi { public Completable logoutUser(); //updateUser - public Completable updateUser(String username,User user); + public Completable updateUser(String username,User body); } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java index 2700bc5b2469..7233d8e3e29a 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java @@ -46,13 +46,13 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "createUser"; - JsonObject userParam = message.body().getJsonObject("User"); - if (userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - User user = Json.mapper.readValue(userParam.encode(), User.class); - service.createUser(user).subscribe( + User body = Json.mapper.readValue(bodyParam.encode(), User.class); + service.createUser(body).subscribe( () -> { message.reply(null); }, @@ -70,14 +70,14 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "createUsersWithArrayInput"; - JsonArray userParam = message.body().getJsonArray("User"); - if(userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonArray bodyParam = message.body().getJsonArray("body"); + if(bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - List user = Json.mapper.readValue(userParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, List.class)); - service.createUsersWithArrayInput(user).subscribe( + List body = Json.mapper.readValue(bodyParam.encode(), + Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); + service.createUsersWithArrayInput(body).subscribe( () -> { message.reply(null); }, @@ -95,14 +95,14 @@ public void start() throws Exception { try { // Workaround for #allParams section clearing the vendorExtensions map String serviceId = "createUsersWithListInput"; - JsonArray userParam = message.body().getJsonArray("User"); - if(userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonArray bodyParam = message.body().getJsonArray("body"); + if(bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - List user = Json.mapper.readValue(userParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, List.class)); - service.createUsersWithListInput(user).subscribe( + List body = Json.mapper.readValue(bodyParam.encode(), + Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); + service.createUsersWithListInput(body).subscribe( () -> { message.reply(null); }, @@ -222,13 +222,13 @@ public void start() throws Exception { return; } String username = usernameParam; - JsonObject userParam = message.body().getJsonObject("User"); - if (userParam == null) { - manageError(message, new MainApiException(400, "User is required"), serviceId); + JsonObject bodyParam = message.body().getJsonObject("body"); + if (bodyParam == null) { + manageError(message, new MainApiException(400, "body is required"), serviceId); return; } - User user = Json.mapper.readValue(userParam.encode(), User.class); - service.updateUser(username, user).subscribe( + User body = Json.mapper.readValue(bodyParam.encode(), User.class); + service.updateUser(username, body).subscribe( () -> { message.reply(null); }, diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json index f76425b94466..2f40e269947a 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json @@ -1,35 +1,32 @@ { "openapi" : "3.0.1", "info" : { - "title" : "OpenAPI Petstore", "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" : [ { - "name" : "pet", - "description" : "Everything about your Pets" + "description" : "Everything about your Pets", + "name" : "pet" }, { - "name" : "store", - "description" : "Access to Petstore orders" + "description" : "Access to Petstore orders", + "name" : "store" }, { - "name" : "user", - "description" : "Operations about user" + "description" : "Operations about user", + "name" : "user" } ], "paths" : { "/pet" : { - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "operationId" : "updatePet", + "post" : { + "operationId" : "addPet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -42,36 +39,29 @@ } } }, + "description" : "Pet object that needs to be added to the store", "required" : true }, "responses" : { - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Pet not found", - "content" : { } - }, "405" : { - "description" : "Validation exception", - "content" : { } + "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-serviceid" : "updatePet", - "x-serviceid-varname" : "UPDATEPET_SERVICE_ID" + "x-serviceid" : "addPet", + "x-serviceid-varname" : "ADDPET_SERVICE_ID" }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "operationId" : "addPet", + "put" : { + "operationId" : "updatePet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -84,75 +74,87 @@ } } }, + "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" : { - "description" : "Invalid input", - "content" : { } + "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-serviceid" : "addPet", - "x-serviceid-varname" : "ADDPET_SERVICE_ID" + "x-serviceid" : "updatePet", + "x-serviceid-varname" : "UPDATEPET_SERVICE_ID" } }, "/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, + "in" : "query", + "name" : "status", + "required" : true, "schema" : { - "type" : "array", "items" : { - "type" : "string", + "default" : "available", "enum" : [ "available", "pending", "sold" ], - "default" : "available" - } - } + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid status value", - "content" : { } + "content" : { }, + "description" : "Invalid status value" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], + "summary" : "Finds Pets by status", + "tags" : [ "pet" ], "x-accepts" : "application/json", "x-serviceid" : "findPetsByStatus", "x-serviceid-varname" : "FINDPETSBYSTATUS_SERVICE_ID" @@ -160,79 +162,109 @@ }, "/pet/findByTags" : { "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", + "deprecated" : true, "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, + "in" : "query", + "name" : "tags", + "required" : true, "schema" : { - "type" : "array", "items" : { "type" : "string" - } - } + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid tag value", - "content" : { } + "content" : { }, + "description" : "Invalid tag value" } }, - "deprecated" : true, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], + "summary" : "Finds Pets by tags", + "tags" : [ "pet" ], "x-accepts" : "application/json", "x-serviceid" : "findPetsByTags", "x-serviceid-varname" : "FINDPETSBYTAGS_SERVICE_ID" } }, "/pet/{petId}" : { - "get" : { + "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" : { + "400" : { + "content" : { }, + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Deletes a pet", "tags" : [ "pet" ], - "summary" : "Find pet by ID", + "x-accepts" : "application/json", + "x-serviceid" : "deletePet", + "x-serviceid-varname" : "DELETEPET_SERVICE_ID" + }, + "get" : { "description" : "Returns a single pet", "operationId" : "getPetById", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to return", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -244,36 +276,37 @@ "$ref" : "#/components/schemas/Pet" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Pet not found", - "content" : { } + "content" : { }, + "description" : "Pet not found" } }, "security" : [ { "api_key" : [ ] } ], + "summary" : "Find pet by ID", + "tags" : [ "pet" ], "x-accepts" : "application/json", "x-serviceid" : "getPetById", "x-serviceid-varname" : "GETPETBYID_SERVICE_ID" }, "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", "operationId" : "updatePetWithForm", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet that needs to be updated", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -282,12 +315,12 @@ "schema" : { "properties" : { "name" : { - "type" : "string", - "description" : "Updated name of the pet" + "description" : "Updated name of the pet", + "type" : "string" }, "status" : { - "type" : "string", - "description" : "Updated status of the pet" + "description" : "Updated status of the pet", + "type" : "string" } } } @@ -296,65 +329,32 @@ }, "responses" : { "405" : { - "description" : "Invalid input", - "content" : { } + "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-serviceid" : "updatePetWithForm", "x-serviceid-varname" : "UPDATEPETWITHFORM_SERVICE_ID" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "operationId" : "deletePet", - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "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", - "content" : { } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-accepts" : "application/json", - "x-serviceid" : "deletePet", - "x-serviceid-varname" : "DELETEPET_SERVICE_ID" } }, "/pet/{petId}/uploadImage" : { "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", "operationId" : "uploadFile", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to update", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -363,13 +363,13 @@ "schema" : { "properties" : { "additionalMetadata" : { - "type" : "string", - "description" : "Additional data to pass to server" + "description" : "Additional data to pass to server", + "type" : "string" }, "file" : { - "type" : "string", "description" : "file to upload", - "format" : "binary" + "format" : "binary", + "type" : "string" } } } @@ -378,19 +378,21 @@ }, "responses" : { "200" : { - "description" : "successful operation", "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-serviceid" : "uploadFile", @@ -399,29 +401,29 @@ }, "/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" - } + "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-serviceid" : "getInventory", "x-serviceid-varname" : "GETINVENTORY_SERVICE_ID" @@ -429,11 +431,8 @@ }, "/store/order" : { "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", "operationId" : "placeOrder", "requestBody" : { - "description" : "order placed for purchasing the pet", "content" : { "*/*" : { "schema" : { @@ -441,11 +440,11 @@ } } }, + "description" : "order placed for purchasing the pet", "required" : true }, "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -457,13 +456,17 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid Order", - "content" : { } + "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-serviceid" : "placeOrder", @@ -471,26 +474,51 @@ } }, "/store/order/{orderId}" : { - "get" : { + "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" : "orderId", + "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" ], - "summary" : "Find purchase order by ID", + "x-accepts" : "application/json", + "x-serviceid" : "deleteOrder", + "x-serviceid-varname" : "DELETEORDER_SERVICE_ID" + }, + "get" : { "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", "operationId" : "getOrderById", "parameters" : [ { - "name" : "orderId", - "in" : "path", "description" : "ID of pet that needs to be fetched", + "in" : "path", + "name" : "orderId", "required" : true, "schema" : { + "format" : "int64", "maximum" : 5, "minimum" : 1, - "type" : "integer", - "format" : "int64" + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -502,58 +530,30 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Order not found", - "content" : { } + "content" : { }, + "description" : "Order not found" } }, + "summary" : "Find purchase order by ID", + "tags" : [ "store" ], "x-accepts" : "application/json", "x-serviceid" : "getOrderById", "x-serviceid-varname" : "GETORDERBYID_SERVICE_ID" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Order not found", - "content" : { } - } - }, - "x-accepts" : "application/json", - "x-serviceid" : "deleteOrder", - "x-serviceid-varname" : "DELETEORDER_SERVICE_ID" } }, "/user" : { "post" : { - "tags" : [ "user" ], - "summary" : "Create user", "description" : "This can only be done by the logged in user.", "operationId" : "createUser", "requestBody" : { - "description" : "Created user object", "content" : { "*/*" : { "schema" : { @@ -561,15 +561,19 @@ } } }, + "description" : "Created user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, - "x-contentType" : "*/*", + "summary" : "Create user", + "tags" : [ "user" ], + "x-codegen-request-body-name" : "body", + "x-contentType" : "*/*", "x-accepts" : "application/json", "x-serviceid" : "createUser", "x-serviceid-varname" : "CREATEUSER_SERVICE_ID" @@ -577,29 +581,30 @@ }, "/user/createWithArray" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithArrayInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "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-serviceid" : "createUsersWithArrayInput", @@ -608,29 +613,30 @@ }, "/user/createWithList" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithListInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "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-serviceid" : "createUsersWithListInput", @@ -639,21 +645,19 @@ }, "/user/login" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", "operationId" : "loginUser", "parameters" : [ { - "name" : "username", - "in" : "query", "description" : "The user name for login", + "in" : "query", + "name" : "username", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "password", - "in" : "query", "description" : "The password for login in clear text", + "in" : "query", + "name" : "password", "required" : true, "schema" : { "type" : "string" @@ -661,41 +665,43 @@ } ], "responses" : { "200" : { - "description" : "successful operation", - "headers" : { - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", + "content" : { + "application/xml" : { "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, - "X-Expires-After" : { - "description" : "date in UTC when toekn expires", + "application/json" : { "schema" : { - "type" : "string", - "format" : "date-time" + "type" : "string" } } }, - "content" : { - "application/xml" : { + "description" : "successful operation", + "headers" : { + "X-Rate-Limit" : { + "description" : "calls per hour allowed by the user", "schema" : { - "type" : "string" + "format" : "int32", + "type" : "integer" } }, - "application/json" : { + "X-Expires-After" : { + "description" : "date in UTC when toekn expires", "schema" : { + "format" : "date-time", "type" : "string" } } } }, "400" : { - "description" : "Invalid username/password supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username/password supplied" } }, + "summary" : "Logs user into the system", + "tags" : [ "user" ], "x-accepts" : "application/json", "x-serviceid" : "loginUser", "x-serviceid-varname" : "LOGINUSER_SERVICE_ID" @@ -703,29 +709,55 @@ }, "/user/logout" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", "operationId" : "logoutUser", "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Logs out current logged in user session", + "tags" : [ "user" ], "x-accepts" : "application/json", "x-serviceid" : "logoutUser", "x-serviceid-varname" : "LOGOUTUSER_SERVICE_ID" } }, "/user/{username}" : { - "get" : { + "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" ], - "summary" : "Get user by user name", + "x-accepts" : "application/json", + "x-serviceid" : "deleteUser", + "x-serviceid-varname" : "DELETEUSER_SERVICE_ID" + }, + "get" : { "operationId" : "getUserByName", "parameters" : [ { - "name" : "username", - "in" : "path", "description" : "The name that needs to be fetched. Use user1 for testing.", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" @@ -733,7 +765,6 @@ } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -745,37 +776,37 @@ "$ref" : "#/components/schemas/User" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid username supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } }, + "summary" : "Get user by user name", + "tags" : [ "user" ], "x-accepts" : "application/json", "x-serviceid" : "getUserByName", "x-serviceid-varname" : "GETUSERBYNAME_SERVICE_ID" }, "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", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" } } ], "requestBody" : { - "description" : "Updated user object", "content" : { "*/*" : { "schema" : { @@ -783,126 +814,111 @@ } } }, + "description" : "Updated user object", "required" : true }, "responses" : { "400" : { - "description" : "Invalid user supplied", - "content" : { } + "content" : { }, + "description" : "Invalid user supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } }, + "summary" : "Updated user", + "tags" : [ "user" ], + "x-codegen-request-body-name" : "body", "x-contentType" : "*/*", "x-accepts" : "application/json", "x-serviceid" : "updateUser", "x-serviceid-varname" : "UPDATEUSER_SERVICE_ID" - }, - "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", - "content" : { } - }, - "404" : { - "description" : "User not found", - "content" : { } - } - }, - "x-accepts" : "application/json", - "x-serviceid" : "deleteUser", - "x-serviceid-varname" : "DELETEUSER_SERVICE_ID" } } }, "components" : { "schemas" : { "Order" : { - "title" : "Pet Order", - "type" : "object", + "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" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "petId" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "quantity" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "shipDate" : { - "type" : "string", - "format" : "date-time" + "format" : "date-time", + "type" : "string" }, "status" : { - "type" : "string", "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] + "enum" : [ "placed", "approved", "delivered" ], + "type" : "string" }, "complete" : { - "type" : "boolean", - "default" : false + "default" : false, + "type" : "boolean" } }, - "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" - }, + "title" : "Pet Order", + "type" : "object", "xml" : { "name" : "Order" } }, "Category" : { - "title" : "Pet category", - "type" : "object", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "name" : { "type" : "string" } }, - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, + "title" : "Pet category", + "type" : "object", "xml" : { "name" : "Category" } }, "User" : { - "title" : "a User", - "type" : "object", + "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" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "username" : { "type" : "string" @@ -923,118 +939,113 @@ "type" : "string" }, "userStatus" : { - "type" : "integer", "description" : "User Status", - "format" : "int32" + "format" : "int32", + "type" : "integer" } }, - "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" - }, + "title" : "a User", + "type" : "object", "xml" : { "name" : "User" } }, "Tag" : { - "title" : "Pet Tag", - "type" : "object", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "name" : { "type" : "string" } }, - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, + "title" : "Pet Tag", + "type" : "object", "xml" : { "name" : "Tag" } }, "Pet" : { - "title" : "a Pet", - "required" : [ "name", "photoUrls" ], - "type" : "object", + "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" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "category" : { "$ref" : "#/components/schemas/Category" }, "name" : { - "type" : "string", - "example" : "doggie" + "example" : "doggie", + "type" : "string" }, "photoUrls" : { + "items" : { + "type" : "string" + }, "type" : "array", "xml" : { "name" : "photoUrl", "wrapped" : true - }, - "items" : { - "type" : "string" } }, "tags" : { + "items" : { + "$ref" : "#/components/schemas/Tag" + }, "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" ] + "enum" : [ "available", "pending", "sold" ], + "type" : "string" } }, - "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" - }, + "required" : [ "name", "photoUrls" ], + "title" : "a Pet", + "type" : "object", "xml" : { "name" : "Pet" } }, "ApiResponse" : { - "title" : "An uploaded response", - "type" : "object", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + }, "properties" : { "code" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "type" : { "type" : "string" @@ -1043,17 +1054,12 @@ "type" : "string" } }, - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } + "title" : "An uploaded response", + "type" : "object" } }, "securitySchemes" : { "petstore_auth" : { - "type" : "oauth2", "flows" : { "implicit" : { "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", @@ -1062,12 +1068,13 @@ "read:pets" : "read your pets" } } - } + }, + "type" : "oauth2" }, "api_key" : { - "type" : "apiKey", + "in" : "header", "name" : "api_key", - "in" : "header" + "type" : "apiKey" } } } 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 2656b70be2ce..f3cae71805cf 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 @@ -251,7 +251,7 @@ default CompletableFuture> testClientModel(@ApiParam(valu @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default CompletableFuture> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default CompletableFuture> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -279,7 +279,7 @@ default CompletableFuture> testEndpointParameters(@ApiParam @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -339,7 +339,7 @@ default CompletableFuture> testInlineAdditionalProperties(@ @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default CompletableFuture> testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default CompletableFuture> testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -387,7 +387,7 @@ default CompletableFuture> testQueryParameterCollectionForm produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default CompletableFuture> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index d61bcf7ec14b..e3a45ff198c0 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 @@ -262,7 +262,7 @@ default CompletableFuture> updatePet(@ApiParam(value = "Pet @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -288,7 +288,7 @@ default CompletableFuture> updatePetWithForm(@ApiParam(valu produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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-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 82903065e9a7..5bc1cc976270 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 @@ -246,7 +246,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) LocalDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) LocalDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -274,7 +274,7 @@ default ResponseEntity testEndpointParameters(@ApiParam(value = "None", re @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -334,7 +334,7 @@ default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "r @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -382,7 +382,7 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 66fd0968ad07..9ea6f243fd0c 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 @@ -255,7 +255,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,7 +281,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 3b47096fc42b..8a6dcc8700c9 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 @@ -196,7 +196,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback); + ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback); /** @@ -221,7 +221,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString); + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString); /** @@ -272,7 +272,7 @@ public interface FakeApi { @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2); + ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2); /** @@ -314,6 +314,6 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata); } 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 b4d0e8b828fa..4dbcc0897822 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 @@ -181,7 +181,7 @@ public ResponseEntity testClientModel(@ApiParam(value = "client model" , * or User not found (status code 404) * @see FakeApi#testEndpointParameters */ - public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -202,7 +202,7 @@ public ResponseEntity testEndpointParameters(@ApiParam(value = "None", req * or Not found (status code 404) * @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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,7 +245,7 @@ public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "re * @return successful operation (status code 200) * @see FakeApi#testJsonFormData */ - public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -276,7 +276,7 @@ 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("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/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 04dd4bb754cb..a39265759eee 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 @@ -187,7 +187,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status); /** @@ -210,6 +210,6 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - 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") @Valid @RequestPart("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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file); } 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 ee5e3d0e13be..faa5c4a3f186 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 @@ -164,7 +164,7 @@ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs t * @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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -178,7 +178,7 @@ 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") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 3b47096fc42b..8a6dcc8700c9 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 @@ -196,7 +196,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback); + ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback); /** @@ -221,7 +221,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString); + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString); /** @@ -272,7 +272,7 @@ public interface FakeApi { @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2); + ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2); /** @@ -314,6 +314,6 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata); } 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 5d82a5f27c28..568f6689973c 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 @@ -181,7 +181,7 @@ public ResponseEntity testClientModel(@ApiParam(value = "client model" , * or User not found (status code 404) * @see FakeApi#testEndpointParameters */ - public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -202,7 +202,7 @@ public ResponseEntity testEndpointParameters(@ApiParam(value = "None", req * or Not found (status code 404) * @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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,7 +245,7 @@ public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "re * @return successful operation (status code 200) * @see FakeApi#testJsonFormData */ - public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -276,7 +276,7 @@ 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("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 04dd4bb754cb..a39265759eee 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 @@ -187,7 +187,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status); /** @@ -210,6 +210,6 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - 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") @Valid @RequestPart("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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file); } 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 efb678fc1253..3197b3602599 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 @@ -164,7 +164,7 @@ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs t * @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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -178,7 +178,7 @@ 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") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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-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 43541c2fb117..45013402de43 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 @@ -216,7 +216,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -243,7 +243,7 @@ default ResponseEntity testEndpointParameters(@ApiParam(value = "None", re @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -300,7 +300,7 @@ default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "r @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return getDelegate().testJsonFormData(param, param2); } @@ -346,7 +346,7 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 2aa2ba4e7027..04aeab23b1cd 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 @@ -203,7 +203,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -228,7 +228,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file) { return getDelegate().uploadFile(petId, additionalMetadata, file); } 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 3b47096fc42b..8a6dcc8700c9 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 @@ -196,7 +196,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback); + ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback); /** @@ -221,7 +221,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString); + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString); /** @@ -272,7 +272,7 @@ public interface FakeApi { @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2); + ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2); /** @@ -314,6 +314,6 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata); } 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 6528d71f79af..08cb74bd70c2 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 @@ -157,7 +157,7 @@ public ResponseEntity testClientModel(@ApiParam(value = "client model" , * or User not found (status code 404) * @see FakeApi#testEndpointParameters */ - public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -177,7 +177,7 @@ public ResponseEntity testEndpointParameters(@ApiParam(value = "None", req * or Not found (status code 404) * @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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -217,7 +217,7 @@ public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "re * @return successful operation (status code 200) * @see FakeApi#testJsonFormData */ - public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return delegate.testJsonFormData(param, param2); } @@ -246,7 +246,7 @@ 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("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata) { return delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } 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 04dd4bb754cb..a39265759eee 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 @@ -187,7 +187,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status); /** @@ -210,6 +210,6 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - 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") @Valid @RequestPart("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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file); } 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 02670b32e6a7..fde43a0d1d01 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 @@ -120,7 +120,7 @@ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs t * @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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return delegate.updatePetWithForm(petId, name, status); } @@ -133,7 +133,7 @@ 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") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file) { return delegate.uploadFile(petId, additionalMetadata, file); } 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 6fa5be93c32c..8b9a7abc6806 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 @@ -264,7 +264,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -294,7 +294,7 @@ default ResponseEntity testEndpointParameters(@ApiParam(value = "None", re @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -360,7 +360,7 @@ default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "r @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -412,7 +412,7 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 4d44d0898da4..b1a1230d7fce 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 @@ -269,7 +269,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -297,7 +297,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index a009e67dd33e..219564b384a3 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 @@ -219,7 +219,7 @@ default Mono> testClientModel(@ApiParam(value = "client m @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default Mono> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback, ServerWebExchange exchange) { + default Mono> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback, ServerWebExchange exchange) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); } @@ -246,7 +246,7 @@ default Mono> testEndpointParameters(@ApiParam(value = "Non @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString, ServerWebExchange exchange) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString, ServerWebExchange exchange) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); } @@ -303,7 +303,7 @@ default Mono> testInlineAdditionalProperties(@ApiParam(valu @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default Mono> testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2, ServerWebExchange exchange) { + default Mono> testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2, ServerWebExchange exchange) { return getDelegate().testJsonFormData(param, param2, exchange); } @@ -349,7 +349,7 @@ default Mono> testQueryParameterCollectionFormat(@NotNull @ produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default Mono> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, ServerWebExchange exchange) { + 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") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, ServerWebExchange exchange) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); } 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 a551156d8657..d2a9b4687777 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 @@ -206,7 +206,7 @@ default Mono> updatePet(@ApiParam(value = "Pet object that @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) String status, 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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, ServerWebExchange exchange) { return getDelegate().updatePetWithForm(petId, name, status, exchange); } @@ -231,7 +231,7 @@ default Mono> updatePetWithForm(@ApiParam(value = "ID of pe produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default Mono> 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") @Valid @RequestPart("file") MultipartFile file, 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file, ServerWebExchange exchange) { return getDelegate().uploadFile(petId, additionalMetadata, file, exchange); } 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 a7f5141bc414..7f396714b112 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 @@ -246,7 +246,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -274,7 +274,7 @@ default ResponseEntity testEndpointParameters(@ApiParam(value = "None", re @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -334,7 +334,7 @@ default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "r @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -382,7 +382,7 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 9ec0b683d00e..170b08bb757e 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 @@ -255,7 +255,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,7 +281,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 972c0c2501de..197f3ec3dd3e 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 @@ -258,7 +258,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -287,7 +287,7 @@ default ResponseEntity testEndpointParameters(@ApiParam(value = "None", re @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -350,7 +350,7 @@ default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "r @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -400,7 +400,7 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 8367cefd5f84..acb0fa37b4b6 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 @@ -265,7 +265,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -292,7 +292,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") 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/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 27050cf2c997..563d751b4b75 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 @@ -246,7 +246,7 @@ default ResponseEntity testClientModel(@ApiParam(value = "client model" @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart("binary") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary") MultipartFile binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -274,7 +274,7 @@ default ResponseEntity testEndpointParameters(@ApiParam(value = "None", re @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - 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=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + 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=">, $") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -334,7 +334,7 @@ default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "r @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestPart(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestPart(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -382,7 +382,7 @@ default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiPar produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart("requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(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") @Valid @RequestPart(value = "requiredFile") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @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/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 66fd0968ad07..9ea6f243fd0c 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 @@ -255,7 +255,7 @@ default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - 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") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(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") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -281,7 +281,7 @@ default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default 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") @Valid @RequestPart("file") 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") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file") MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { From 5bf501af402be2b0ce6a883cfe4a3a32548db90a Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Wed, 5 Feb 2020 01:51:29 +0000 Subject: [PATCH 58/72] [swift5] update visibility modifiers (#5204) --- .../libraries/urlsession/URLSessionImplementations.mustache | 2 +- .../swift5/alamofireLibrary/.openapi-generator/VERSION | 2 +- .../PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md | 6 +++--- .../swift5/combineLibrary/.openapi-generator/VERSION | 2 +- .../combineLibrary/PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- .../client/petstore/swift5/combineLibrary/docs/FakeAPI.md | 6 +++--- .../petstore/swift5/default/.openapi-generator/VERSION | 2 +- .../swift5/default/PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- samples/client/petstore/swift5/default/docs/FakeAPI.md | 6 +++--- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 2 +- .../nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md | 6 +++--- .../swift5/objcCompatible/.openapi-generator/VERSION | 2 +- .../objcCompatible/PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- .../client/petstore/swift5/objcCompatible/docs/FakeAPI.md | 6 +++--- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 2 +- .../PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- .../petstore/swift5/promisekitLibrary/docs/FakeAPI.md | 6 +++--- .../swift5/resultLibrary/.openapi-generator/VERSION | 2 +- .../resultLibrary/PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- .../client/petstore/swift5/resultLibrary/docs/FakeAPI.md | 6 +++--- .../swift5/rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- .../client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md | 6 +++--- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 2 +- .../PetstoreClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- .../petstore/swift5/urlsessionLibrary/docs/FakeAPI.md | 6 +++--- .../client/test/swift5/default/.openapi-generator/VERSION | 2 +- .../swift5/default/TestClient.xcodeproj/project.pbxproj | 2 ++ .../Classes/OpenAPIs/URLSessionImplementations.swift | 2 +- 39 files changed, 67 insertions(+), 47 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache index dd8f606d3672..3bdcc13331e9 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache @@ -384,7 +384,7 @@ fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataD var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj index 5a3cb5019cc4..5364daaa904b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -305,6 +305,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md index 0e9325f77e94..d0ab705d4e4b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj index 6f8918eb338e..1ec755a41003 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -265,6 +265,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md index 0e9325f77e94..d0ab705d4e4b 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj index 6f8918eb338e..1ec755a41003 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj @@ -265,6 +265,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md index 0e9325f77e94..d0ab705d4e4b 100644 --- a/samples/client/petstore/swift5/default/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj index 6f8918eb338e..1ec755a41003 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj @@ -265,6 +265,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 876ba9195b1c..5282c1d239d3 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md index 6a16d54b005a..dd2d871bca84 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj index 6f8918eb338e..1ec755a41003 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj @@ -265,6 +265,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md index 63b00fcbfa59..f7faf3aa2aa6 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj index 31525ebfdc62..1bcdd634be08 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -305,6 +305,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md index 72c908dd5898..5519037c52cb 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body).then { // when the promise is fulfilled @@ -490,10 +490,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj index 6f8918eb338e..1ec755a41003 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -265,6 +265,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md index 0e9325f77e94..d0ab705d4e4b 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj index 8efc1d35ec6e..9026fc0c762c 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -305,6 +305,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md index 872c0359f04b..aae8b34423b7 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new ``` @@ -433,10 +433,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj index 6f8918eb338e..1ec755a41003 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -265,6 +265,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6084a18be722..f0a598767220 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md index 0e9325f77e94..d0ab705d4e4b 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md @@ -32,7 +32,7 @@ Test serialization of outer boolean types // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = false // Bool | Input boolean as post body (optional) +let body = true // Bool | Input boolean as post body (optional) FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in guard error == nil else { @@ -517,10 +517,10 @@ Fake endpoint to test group parameters (optional) import PetstoreClient let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters let requiredInt64Group = 987 // Int64 | Required Integer in group parameters let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = false // Bool | Boolean in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) let int64Group = 987 // Int64 | Integer in group parameters (optional) // Fake endpoint to test group parameters (optional) diff --git a/samples/client/test/swift5/default/.openapi-generator/VERSION b/samples/client/test/swift5/default/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/test/swift5/default/.openapi-generator/VERSION +++ b/samples/client/test/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj b/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj index 76aacba998f3..58c7e0223e7e 100644 --- a/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj +++ b/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj @@ -187,6 +187,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; + TargetAttributes = { + }; }; buildConfigurationList = 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */; compatibilityVersion = "Xcode 10.0"; diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift index bcc49ecc7cad..4ed152fdd639 100644 --- a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -384,7 +384,7 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling From 7e54196967fcd3629495042caaa776fc449f8a1a Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Wed, 5 Feb 2020 11:51:48 +0900 Subject: [PATCH 59/72] [csharp-netcore] Remove use of dynamic type and optimize reference (#5206) * Change unnecessary `dynamic` to `object` * Optimize package reference * Fixed JsonSubTypes reference * Update sample project * Remove redundant method calls * Update sample project * Update README template --- .../resources/csharp-netcore/ApiClient.mustache | 2 +- .../csharp-netcore/ApiException.mustache | 4 ++-- .../csharp-netcore/ClientUtils.mustache | 16 ---------------- .../resources/csharp-netcore/Project.mustache | 4 ++++ .../resources/csharp-netcore/README.mustache | 8 ++++++++ .../csharp-netcore/netcore_project.mustache | 4 ++++ .../resources/csharp-netcore/nuspec.mustache | 7 +++++-- .../csharp-netcore/packages.config.mustache | 4 +++- .../csharp-netcore/project.json.mustache | 3 +++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 +- .../src/Org.OpenAPITools/Client/ApiException.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ClientUtils.cs | 11 ----------- .../src/Org.OpenAPITools/project.json | 1 + .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 +- .../src/Org.OpenAPITools/Client/ApiException.cs | 4 ++-- .../src/Org.OpenAPITools/Client/ClientUtils.cs | 11 ----------- 16 files changed, 37 insertions(+), 50 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 3c0aacbacb5c..605d68ffc57c 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache @@ -114,7 +114,7 @@ namespace {{packageName}}.Client if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type { - return ClientUtils.ConvertType(response.Content, type); + return Convert.ChangeType(response.Content, type); } // at this point, it must be a model (json) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiException.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiException.mustache index 138284907c6a..32c59a1b3d58 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiException.mustache @@ -19,7 +19,7 @@ namespace {{packageName}}.Client /// Gets or sets the error content (body json object) /// /// The error content (Http response body). - public {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} ErrorContent { get; private set; } + public object ErrorContent { get; private set; } /// /// Initializes a new instance of the class. @@ -42,7 +42,7 @@ namespace {{packageName}}.Client /// HTTP status code. /// Error message. /// Error content. - public ApiException(int errorCode, string message, {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} errorContent = null) : base(message) + public ApiException(int errorCode, string message, object errorContent = null) : base(message) { this.ErrorCode = errorCode; this.ErrorContent = errorContent; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache index 8601b2e9c34e..b407a4edd08d 100755 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache @@ -159,22 +159,6 @@ namespace {{packageName}}.Client } } - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - {{#supportsAsync}} - public static dynamic ConvertType(dynamic fromObject, Type toObject) - {{/supportsAsync}} - {{^supportsAsync}} - public static object ConvertType(T fromObject, Type toObject) where T : class - {{/supportsAsync}} - { - return Convert.ChangeType(fromObject, toObject); - } - /// /// Select the Content-Type header's value from the given content-type array: /// if JSON type exists in the given array, use it; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache index bc7ff4020320..e4c9ed9e095a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/Project.mustache @@ -36,10 +36,14 @@ + {{#useCompareNetObjects}} + {{/useCompareNetObjects}} + {{#validatable}} + {{/validatable}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache index 8ef566b7f35b..666e7933c0a9 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache @@ -30,16 +30,24 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap - [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.10.1 or later - [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.1 or later - [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.5.2 or later +{{#useCompareNetObjects}} - [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.57.0 or later +{{/useCompareNetObjects}} +{{#validatable}} - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.5.0 or later +{{/validatable}} The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: ``` Install-Package RestSharp Install-Package Newtonsoft.Json Install-Package JsonSubTypes +{{#validatable}} Install-Package System.ComponentModel.Annotations +{{/validatable}} +{{#useCompareNetObjects}} Install-Package CompareNETObjects +{{/useCompareNetObjects}} ``` NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) 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 0346837de672..61427915ad97 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 @@ -22,11 +22,15 @@ + {{#useCompareNetObjects}} + {{/useCompareNetObjects}} + {{#validatable}} + {{/validatable}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache index d0e2cc20a062..9753c1cbd559 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache @@ -30,12 +30,15 @@ - - + + {{#useCompareNetObjects}} + {{/useCompareNetObjects}} + {{#validatable}} + {{/validatable}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/packages.config.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/packages.config.mustache index 9ecc3466e624..7f4587c5e58e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/packages.config.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/packages.config.mustache @@ -5,6 +5,8 @@ {{/useCompareNetObjects}} - + + {{#validatable}} + {{/validatable}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/project.json.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/project.json.mustache index b33a9aefd6c9..62dbd6a9e412 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/project.json.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/project.json.mustache @@ -5,6 +5,9 @@ {{#useCompareNetObjects}} "CompareNETObjects": "4.57.0", {{/useCompareNetObjects}} + {{#validatable}} + "System.ComponentModel.Annotations": "4.5.0", + {{/validatable}} "JsonSubTypes": "1.5.2", "RestSharp": "106.10.1" }, 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 b34b41b53214..19106bf27789 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 @@ -118,7 +118,7 @@ internal object Deserialize(IRestResponse response, Type type) if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type { - return ClientUtils.ConvertType(response.Content, type); + return Convert.ChangeType(response.Content, type); } // at this point, it must be a model (json) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs index 970215dd0087..8f02a03a56ae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs @@ -28,7 +28,7 @@ public class ApiException : Exception /// Gets or sets the error content (body json object) /// /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } + public object ErrorContent { get; private set; } /// /// Initializes a new instance of the class. @@ -51,7 +51,7 @@ public ApiException(int errorCode, string message) : base(message) /// HTTP status code. /// Error message. /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + public ApiException(int errorCode, string message, object errorContent = null) : base(message) { this.ErrorCode = errorCode; this.ErrorContent = errorContent; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs index 764ea009ef93..9bd20d5f5768 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -164,17 +164,6 @@ public static byte[] ReadAsBytes(Stream inputStream) } } - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - /// /// Select the Content-Type header's value from the given content-type array: /// if JSON type exists in the given array, use it; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/project.json b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/project.json index d66033d858db..fdaea921baa8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/project.json +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/project.json @@ -3,6 +3,7 @@ "dependencies": { "Newtonsoft.Json": "12.0.1", "CompareNETObjects": "4.57.0", + "System.ComponentModel.Annotations": "4.5.0", "JsonSubTypes": "1.5.2", "RestSharp": "106.10.1" }, 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 96f84b5a6ee5..fa16398d8bec 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 @@ -119,7 +119,7 @@ internal object Deserialize(IRestResponse response, Type type) if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type { - return ClientUtils.ConvertType(response.Content, type); + return Convert.ChangeType(response.Content, type); } // at this point, it must be a model (json) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiException.cs index 970215dd0087..8f02a03a56ae 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiException.cs @@ -28,7 +28,7 @@ public class ApiException : Exception /// Gets or sets the error content (body json object) /// /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } + public object ErrorContent { get; private set; } /// /// Initializes a new instance of the class. @@ -51,7 +51,7 @@ public ApiException(int errorCode, string message) : base(message) /// HTTP status code. /// Error message. /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + public ApiException(int errorCode, string message, object errorContent = null) : base(message) { this.ErrorCode = errorCode; this.ErrorContent = errorContent; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs index 764ea009ef93..9bd20d5f5768 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -164,17 +164,6 @@ public static byte[] ReadAsBytes(Stream inputStream) } } - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - /// /// Select the Content-Type header's value from the given content-type array: /// if JSON type exists in the given array, use it; From c27da984d198d27cb8080d22ffc182ff74307a15 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Wed, 5 Feb 2020 12:01:18 +0900 Subject: [PATCH 60/72] [kotlin] Fix non-compilable code (#5205) * The "name" field has to be a string * Avoid duplicate double quotes --- .../src/main/resources/kotlin-client/data_class.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index fc43540f4e47..aff77693c950 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -60,7 +60,7 @@ import java.io.Serializable {{#enumVars}} {{^multiplatform}} {{#moshi}} - @Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + @Json(name = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/moshi}} {{#gson}} @SerializedName(value={{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} From 945ea14b2350e41bd14a846fd9f70cf5937822e8 Mon Sep 17 00:00:00 2001 From: Alexey Makhrov Date: Tue, 4 Feb 2020 22:55:36 -0800 Subject: [PATCH 61/72] Add amakhrov to Typescript tech committee (#5210) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fbe7b2db50e1..bfd3259b557e 100644 --- a/README.md +++ b/README.md @@ -936,7 +936,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) @richardwhiuk (2019/07) | | Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03) | | Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) | -| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) | +| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) | :heart: = Link to support the contributor directly From b6b7284e4c4640113284828aee870085f0e50f94 Mon Sep 17 00:00:00 2001 From: gaetPax <47664574+gaetPax@users.noreply.github.com> Date: Wed, 5 Feb 2020 16:10:16 +0100 Subject: [PATCH 62/72] [Java] update feign form dependency version (#5179) * [Java-Feign-issue 5173] - update feign form dependency version * [Java-Feign-issue 5173] - updated feign versions in sample project * [Java-Feign-issue 5173] - fix OAuth in Feign10 sample * [Java-Feign-issue 5173] - updated OAuth Feign template * update feign samples Co-authored-by: William Cheng --- .../resources/Java/libraries/feign/auth/OAuth.mustache | 6 +++--- .../resources/Java/libraries/feign/build.gradle.mustache | 4 ++-- .../resources/Java/libraries/feign/build.sbt.mustache | 8 ++++---- .../src/main/resources/Java/libraries/feign/pom.mustache | 4 ++-- .../src/main/java/org/openapitools/client/auth/OAuth.java | 4 ++-- samples/client/petstore/java/feign10x/build.gradle | 4 ++-- samples/client/petstore/java/feign10x/build.sbt | 8 ++++---- samples/client/petstore/java/feign10x/pom.xml | 4 ++-- .../src/main/java/org/openapitools/client/auth/OAuth.java | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache index 25b1f193ba93..feefdb939813 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache @@ -83,20 +83,20 @@ public class OAuth implements RequestInterceptor { } // If first time, get the token if (expirationTimeMillis == null || System.currentTimeMillis() >= expirationTimeMillis) { - updateAccessToken(); + updateAccessToken(template); } if (getAccessToken() != null) { template.header("Authorization", "Bearer " + getAccessToken()); } } - public synchronized void updateAccessToken() { + public synchronized void updateAccessToken(RequestTemplate template) { OAuthJSONAccessTokenResponse accessTokenResponse; try { accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); } catch (Exception e) { {{#useFeign10}} - throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null); + throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null, template.request()); {{/useFeign10}} {{^useFeign10}} throw new RetryableException(e.getMessage(), e,null); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index 69170a031771..8693ae09e3c8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -126,8 +126,8 @@ ext { {{#threetenbp}} jackson_threetenbp_version = "2.9.10" {{/threetenbp}} - feign_version = "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" - feign_form_version = "2.1.0" + feign_version = "{{#useFeign10}}10.7.4{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" + feign_form_version = "{{#useFeign10}}3.8.0{{/useFeign10}}{{^useFeign10}}2.1.0{{/useFeign10}}" junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index 907b7bd4d276..f7004c178685 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -10,10 +10,10 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.22" % "compile", - "io.github.openfeign" % "feign-core" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", - "io.github.openfeign" % "feign-jackson" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", - "io.github.openfeign" % "feign-slf4j" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", - "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", + "io.github.openfeign" % "feign-core" % "{{#useFeign10}}10.7.4{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", + "io.github.openfeign" % "feign-jackson" % "{{#useFeign10}}10.7.4{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", + "io.github.openfeign" % "feign-slf4j" % "{{#useFeign10}}10.7.4{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", + "io.github.openfeign.form" % "feign-form" % "{{#useFeign10}}3.8.0{{/useFeign10}}{{^useFeign10}}2.1.0{{/useFeign10}}" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index e73e45de1b37..3746cf17c961 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -312,8 +312,8 @@ ${java.version} ${java.version} 1.5.21 - {{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}} - 2.1.0 + {{#useFeign10}}10.7.4{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}} + {{#useFeign10}}3.8.0{{/useFeign10}}{{^useFeign10}}2.1.0{{/useFeign10}} 2.10.1 0.2.1 2.10.1 diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java index 7a2a822415d6..d6d6fae57fbd 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java @@ -80,14 +80,14 @@ public void apply(RequestTemplate template) { } // If first time, get the token if (expirationTimeMillis == null || System.currentTimeMillis() >= expirationTimeMillis) { - updateAccessToken(); + updateAccessToken(template); } if (getAccessToken() != null) { template.header("Authorization", "Bearer " + getAccessToken()); } } - public synchronized void updateAccessToken() { + public synchronized void updateAccessToken(RequestTemplate template) { OAuthJSONAccessTokenResponse accessTokenResponse; try { accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index e859b17d6f99..0671ac665852 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -100,8 +100,8 @@ ext { jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jackson_threetenbp_version = "2.9.10" - feign_version = "10.2.3" - feign_form_version = "2.1.0" + feign_version = "10.7.4" + feign_form_version = "3.8.0" junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/samples/client/petstore/java/feign10x/build.sbt b/samples/client/petstore/java/feign10x/build.sbt index 4106cf955def..f5c10c34706f 100644 --- a/samples/client/petstore/java/feign10x/build.sbt +++ b/samples/client/petstore/java/feign10x/build.sbt @@ -10,10 +10,10 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.22" % "compile", - "io.github.openfeign" % "feign-core" % "10.2.3" % "compile", - "io.github.openfeign" % "feign-jackson" % "10.2.3" % "compile", - "io.github.openfeign" % "feign-slf4j" % "10.2.3" % "compile", - "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", + "io.github.openfeign" % "feign-core" % "10.7.4" % "compile", + "io.github.openfeign" % "feign-jackson" % "10.7.4" % "compile", + "io.github.openfeign" % "feign-slf4j" % "10.7.4" % "compile", + "io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign10x/pom.xml index 305b25834c0c..c4e4fcc2be25 100644 --- a/samples/client/petstore/java/feign10x/pom.xml +++ b/samples/client/petstore/java/feign10x/pom.xml @@ -279,8 +279,8 @@ ${java.version} ${java.version} 1.5.21 - 10.2.3 - 2.1.0 + 10.7.4 + 3.8.0 2.10.1 0.2.1 2.10.1 diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java index 71f838936b27..f59ad4a94ba8 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java @@ -81,19 +81,19 @@ public void apply(RequestTemplate template) { } // If first time, get the token if (expirationTimeMillis == null || System.currentTimeMillis() >= expirationTimeMillis) { - updateAccessToken(); + updateAccessToken(template); } if (getAccessToken() != null) { template.header("Authorization", "Bearer " + getAccessToken()); } } - public synchronized void updateAccessToken() { + public synchronized void updateAccessToken(RequestTemplate template) { OAuthJSONAccessTokenResponse accessTokenResponse; try { accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); } catch (Exception e) { - throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null); + throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null, template.request()); } if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn()); From 08c93578d4f800b21d612325f68dc1bfdd76777f Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Thu, 6 Feb 2020 08:23:26 +0900 Subject: [PATCH 63/72] Update with `-p` as `-D` is deprecated now (#5208) --- docs/customization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/customization.md b/docs/customization.md index 0f868529a6c7..807b2fdb336d 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -224,7 +224,7 @@ apiPackage: "petstore" ``` Supported config options can be different per language. Running `config-help -g {lang}` will show available options. -**These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with `-D{optionName}={optionValue}`**. (If `-D{optionName}` does not work, please open a [ticket](https://github.com/openapitools/openapi-generator/issues/new) and we'll look into it) +**These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with `-p {optionName}={optionValue}`**. (If `-p {optionName}` does not work, please open a [ticket](https://github.com/openapitools/openapi-generator/issues/new) and we'll look into it) ```sh java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -g java From 9d2c39dc43992ad3ae6fe83a0eb1d962e62c1527 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Wed, 5 Feb 2020 20:40:32 -0800 Subject: [PATCH 64/72] Add openAPI attribute to validation and recommendation (#5216) --- .../codegen/utils/ModelUtils.java | 28 +++++++++++-- .../validations/oas/OpenApiEvaluator.java | 15 +++++-- .../oas/OpenApiParameterValidations.java | 5 ++- .../oas/OpenApiSchemaValidations.java | 9 ++-- .../oas/OpenApiSecuritySchemeValidations.java | 6 ++- .../validations/oas/OperationWrapper.java | 15 ++++++- .../validations/oas/ParameterWrapper.java | 41 +++++++++++++++++++ .../validations/oas/SchemaWrapper.java | 41 +++++++++++++++++++ .../oas/SecuritySchemeWrapper.java | 41 +++++++++++++++++++ .../oas/OpenApiOperationValidationsTest.java | 6 +-- .../oas/OpenApiParameterValidationsTest.java | 6 +-- .../oas/OpenApiSchemaValidationsTest.java | 6 +-- .../OpenApiSecuritySchemeValidationsTest.java | 6 +-- 13 files changed, 197 insertions(+), 28 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ParameterWrapper.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SchemaWrapper.java create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SecuritySchemeWrapper.java diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 3872b11d8723..9ae3f6ed3215 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -942,8 +942,28 @@ public static List getInterfaces(ComposedSchema composed) { } /** - * Get the parent model name from the schemas (allOf, anyOf, oneOf). - * If there are multiple parents, return the first one. + * Get the parent model name from the composed schema (allOf, anyOf, oneOf). + * It traverses the OAS model (possibly resolving $ref) to determine schemas + * that specify a determinator. + * If there are multiple elements in the composed schema and it is not clear + * which one should be the parent, return null. + * + * For example, given the following OAS spec, the parent of 'Dog' is Animal + * because 'Animal' specifies a discriminator. + * + * animal: + * type: object + * discriminator: + * propertyName: type + * properties: + * type: string + * + * dog: + * allOf: + * - $ref: '#/components/schemas/animal' + * - type: object + * properties: + * breed: string * * @param composedSchema schema (alias or direct reference) * @param allSchemas all schemas @@ -953,7 +973,6 @@ public static String getParentName(ComposedSchema composedSchema, Map interfaces = getInterfaces(composedSchema); List refedParentNames = new ArrayList<>(); - if (interfaces != null && !interfaces.isEmpty()) { for (Schema schema : interfaces) { // get the actual schema @@ -980,7 +999,8 @@ public static String getParentName(ComposedSchema composedSchema, Map schemas = ModelUtils.getSchemas(specification); - schemas.forEach((key, schema) -> validationResult.consume(schemaValidations.validate(schema))); + schemas.forEach((key, schema) -> { + SchemaWrapper wrapper = new SchemaWrapper(specification, schema); + validationResult.consume(schemaValidations.validate(wrapper)); + }); List parameters = new ArrayList<>(50); @@ -68,7 +71,7 @@ public ValidationResult validate(OpenAPI specification) { parameters.addAll(op.getParameters()); } - OperationWrapper wrapper = new OperationWrapper(op, httpMethod); + OperationWrapper wrapper = new OperationWrapper(specification, op, httpMethod); validationResult.consume(operationValidations.validate(wrapper)); } }); @@ -79,7 +82,10 @@ public ValidationResult validate(OpenAPI specification) { if (components != null) { Map securitySchemes = components.getSecuritySchemes(); if (securitySchemes != null && !securitySchemes.isEmpty()) { - securitySchemes.values().forEach(securityScheme -> validationResult.consume(securitySchemeValidations.validate(securityScheme))); + securitySchemes.values().forEach(securityScheme -> { + SecuritySchemeWrapper wrapper = new SecuritySchemeWrapper(specification, securityScheme); + validationResult.consume(securitySchemeValidations.validate(wrapper)); + }); } if (components.getParameters() != null) { @@ -89,7 +95,8 @@ public ValidationResult validate(OpenAPI specification) { parameters.forEach(parameter -> { parameter = ModelUtils.getReferencedParameter(specification, parameter); - validationResult.consume(parameterValidations.validate(parameter)); + ParameterWrapper wrapper = new ParameterWrapper(specification, parameter); + validationResult.consume(parameterValidations.validate(wrapper)); }); return validationResult; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java index 0e3585585a03..d7bf3ff2e401 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java @@ -12,7 +12,7 @@ /** * A standalone instance for evaluating rules and recommendations related to OAS {@link Parameter} */ -class OpenApiParameterValidations extends GenericValidator { +class OpenApiParameterValidations extends GenericValidator { OpenApiParameterValidations(RuleConfiguration ruleConfiguration) { super(new ArrayList<>()); if (ruleConfiguration.isEnableRecommendations()) { @@ -32,7 +32,8 @@ class OpenApiParameterValidations extends GenericValidator { * @param parameter Any spec doc parameter. The method will handle {@link HeaderParameter} evaluation. * @return {@link ValidationRule.Pass} if the check succeeds, otherwise {@link ValidationRule.Fail} with details "[key] contains an underscore." */ - private static ValidationRule.Result apacheNginxHeaderCheck(Parameter parameter) { + private static ValidationRule.Result apacheNginxHeaderCheck(ParameterWrapper parameterWrapper) { + Parameter parameter = parameterWrapper.getParameter(); if (parameter == null || !parameter.getIn().equals("header")) return ValidationRule.Pass.empty(); ValidationRule.Result result = ValidationRule.Pass.empty(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java index bfb829a8010f..d1f6478366fe 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java @@ -2,6 +2,8 @@ import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; + +import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.validation.GenericValidator; import org.openapitools.codegen.validation.ValidationRule; @@ -10,7 +12,7 @@ /** * A standalone instance for evaluating rules and recommendations related to OAS {@link Schema} */ -class OpenApiSchemaValidations extends GenericValidator { +class OpenApiSchemaValidations extends GenericValidator { OpenApiSchemaValidations(RuleConfiguration ruleConfiguration) { super(new ArrayList<>()); if (ruleConfiguration.isEnableRecommendations()) { @@ -34,10 +36,11 @@ class OpenApiSchemaValidations extends GenericValidator { * Because of this ambiguity in the spec about what is non-standard about oneOf support, we'll warn as a recommendation that * properties on the schema defining oneOf relationships may not be intentional in the OpenAPI Specification. * - * @param schema An input schema, regardless of the type of schema + * @param schemaWrapper An input schema, regardless of the type of schema * @return {@link ValidationRule.Pass} if the check succeeds, otherwise {@link ValidationRule.Fail} */ - private static ValidationRule.Result checkOneOfWithProperties(Schema schema) { + private static ValidationRule.Result checkOneOfWithProperties(SchemaWrapper schemaWrapper) { + Schema schema = schemaWrapper.getSchema(); ValidationRule.Result result = ValidationRule.Pass.empty(); if (schema instanceof ComposedSchema) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java index 53bc3f5224e4..c834e9522cf6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidations.java @@ -1,6 +1,7 @@ package org.openapitools.codegen.validations.oas; import io.swagger.v3.oas.models.security.SecurityScheme; +import io.swagger.v3.oas.models.OpenAPI; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.validation.GenericValidator; import org.openapitools.codegen.validation.ValidationRule; @@ -11,7 +12,7 @@ /** * A standalone instance for evaluating rules and recommendations related to OAS {@link SecurityScheme} */ -class OpenApiSecuritySchemeValidations extends GenericValidator { +class OpenApiSecuritySchemeValidations extends GenericValidator { OpenApiSecuritySchemeValidations(RuleConfiguration ruleConfiguration) { super(new ArrayList<>()); if (ruleConfiguration.isEnableRecommendations()) { @@ -31,7 +32,8 @@ class OpenApiSecuritySchemeValidations extends GenericValidator * @param securityScheme Security schemes are often used as header parameters (e.g. APIKEY). * @return true if the check succeeds (header does not have an underscore, e.g. 'api_key') */ - private static ValidationRule.Result apacheNginxHeaderCheck(SecurityScheme securityScheme) { + private static ValidationRule.Result apacheNginxHeaderCheck(SecuritySchemeWrapper securitySchemeWrapper) { + SecurityScheme securityScheme = securitySchemeWrapper.getSecurityScheme(); if (securityScheme == null || securityScheme.getIn() != SecurityScheme.In.HEADER) return ValidationRule.Pass.empty(); ValidationRule.Result result = ValidationRule.Pass.empty(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java index c2e3b249fdac..5e4cbce630bd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OperationWrapper.java @@ -2,12 +2,14 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.OpenAPI; /** * Encapsulates an operation with its HTTP Method. In OAS, the {@link PathItem} structure contains more than what we'd * want to evaluate for operation-only checks. */ public class OperationWrapper { + OpenAPI specification; private Operation operation; private PathItem.HttpMethod httpMethod; @@ -17,7 +19,8 @@ public class OperationWrapper { * @param operation The operation instances to wrap * @param httpMethod The http method to wrap */ - OperationWrapper(Operation operation, PathItem.HttpMethod httpMethod) { + OperationWrapper(OpenAPI specification, Operation operation, PathItem.HttpMethod httpMethod) { + this.specification = specification; this.operation = operation; this.httpMethod = httpMethod; } @@ -39,4 +42,14 @@ public Operation getOperation() { public PathItem.HttpMethod getHttpMethod() { return httpMethod; } + + + /** + * Returns the OpenAPI specification. + * + * @return The the OpenAPI specification. + */ + public OpenAPI getOpenAPI() { + return specification; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ParameterWrapper.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ParameterWrapper.java new file mode 100644 index 000000000000..7d74d5aae905 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/ParameterWrapper.java @@ -0,0 +1,41 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.OpenAPI; + +/** + * Encapsulates an OAS parameter. + */ +public class ParameterWrapper { + OpenAPI specification; + private Parameter parameter; + + /** + * Constructs a new instance of {@link ParameterWrapper} + * + * @param specification The OAS specification + * @param parameter The OAS parameter + */ + ParameterWrapper(OpenAPI specification, Parameter parameter) { + this.specification = specification; + this.parameter = parameter; + } + + /** + * Return the OAS parameter + * + * @return the OAS parameter + */ + public Parameter getParameter() { + return parameter; + } + + /** + * Returns the OpenAPI specification. + * + * @return The the OpenAPI specification. + */ + public OpenAPI getOpenAPI() { + return specification; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SchemaWrapper.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SchemaWrapper.java new file mode 100644 index 000000000000..5b500035b0e2 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SchemaWrapper.java @@ -0,0 +1,41 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.OpenAPI; + +/** + * Encapsulates an OAS schema. + */ +public class SchemaWrapper { + OpenAPI specification; + private Schema schema; + + /** + * Constructs a new instance of {@link SchemaWrapper} + * + * @param specification The OAS specification + * @param schema The OAS schema + */ + SchemaWrapper(OpenAPI specification, Schema schema) { + this.specification = specification; + this.schema = schema; + } + + /** + * Return the OAS schema + * + * @return the OAS schema + */ + public Schema getSchema() { + return schema; + } + + /** + * Returns the OpenAPI specification. + * + * @return The the OpenAPI specification. + */ + public OpenAPI getOpenAPI() { + return specification; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SecuritySchemeWrapper.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SecuritySchemeWrapper.java new file mode 100644 index 000000000000..c089eeba946b --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/SecuritySchemeWrapper.java @@ -0,0 +1,41 @@ +package org.openapitools.codegen.validations.oas; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.security.SecurityScheme; + +/** + * Encapsulates an OAS parameter. + */ +public class SecuritySchemeWrapper { + OpenAPI specification; + private SecurityScheme securityScheme; + + /** + * Constructs a new instance of {@link SecuritySchemeWrapper} + * + * @param specification The OAS specification + * @param securityScheme The OAS securityScheme + */ + SecuritySchemeWrapper(OpenAPI specification, SecurityScheme securityScheme) { + this.specification = specification; + this.securityScheme = securityScheme; + } + + /** + * Return the OAS securityScheme + * + * @return the OAS securityScheme + */ + public SecurityScheme getSecurityScheme() { + return securityScheme; + } + + /** + * Returns the OpenAPI specification. + * + * @return The the OpenAPI specification. + */ + public OpenAPI getOpenAPI() { + return specification; + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java index c4d911563eca..dacd58c9b8df 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiOperationValidationsTest.java @@ -47,7 +47,7 @@ public void testGetOrHeadWithBody(PathItem.HttpMethod method, String operationId op.setRequestBody(body); } - ValidationResult result = validator.validate(new OperationWrapper(op, method)); + ValidationResult result = validator.validate(new OperationWrapper(null, op, method)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -77,7 +77,7 @@ public void testGetOrHeadWithBodyWithDisabledRecommendations(PathItem.HttpMethod op.setRequestBody(body); } - ValidationResult result = validator.validate(new OperationWrapper(op, method)); + ValidationResult result = validator.validate(new OperationWrapper(null, op, method)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -103,7 +103,7 @@ public void testGetOrHeadWithBodyWithDisabledRule(PathItem.HttpMethod method, St op.setRequestBody(body); } - ValidationResult result = validator.validate(new OperationWrapper(op, method)); + ValidationResult result = validator.validate(new OperationWrapper(null, op, method)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java index a242a355e3a9..2ed46fb5bc83 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidationsTest.java @@ -22,7 +22,7 @@ public void testApacheNginxWithDisabledRecommendations(String in, String key, bo parameter.setIn(in); parameter.setName(key); - ValidationResult result = validator.validate(parameter); + ValidationResult result = validator.validate(new ParameterWrapper(null, parameter)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -43,7 +43,7 @@ public void testApacheNginxWithDisabledRule(String in, String key, boolean match parameter.setIn(in); parameter.setName(key); - ValidationResult result = validator.validate(parameter); + ValidationResult result = validator.validate(new ParameterWrapper(null, parameter)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -64,7 +64,7 @@ public void testDefaultRecommendationApacheNginx(String in, String key, boolean parameter.setIn(in); parameter.setName(key); - ValidationResult result = validator.validate(parameter); + ValidationResult result = validator.validate(new ParameterWrapper(null, parameter)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java index 2f8ad8ce5c98..b2b2070ebef1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidationsTest.java @@ -18,7 +18,7 @@ public void testDefaultRecommendationOneOfWithSiblingProperties(Schema schema, b config.setEnableRecommendations(true); OpenApiSchemaValidations validator = new OpenApiSchemaValidations(config); - ValidationResult result = validator.validate(schema); + ValidationResult result = validator.validate(new SchemaWrapper(null, schema)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -39,7 +39,7 @@ public void testOneOfWithSiblingPropertiesDisabledRecommendations(Schema schema, config.setEnableRecommendations(false); OpenApiSchemaValidations validator = new OpenApiSchemaValidations(config); - ValidationResult result = validator.validate(schema); + ValidationResult result = validator.validate(new SchemaWrapper(null, schema)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -56,7 +56,7 @@ public void testOneOfWithSiblingPropertiesDisabledRule(Schema schema, boolean ma config.setEnableOneOfWithPropertiesRecommendation(false); OpenApiSchemaValidations validator = new OpenApiSchemaValidations(config); - ValidationResult result = validator.validate(schema); + ValidationResult result = validator.validate(new SchemaWrapper(null, schema)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java index aae32dd30126..a0df21ca1783 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/validations/oas/OpenApiSecuritySchemeValidationsTest.java @@ -20,7 +20,7 @@ public void testApacheNginxWithDisabledRecommendations(SecurityScheme.In in, Str SecurityScheme securityScheme = new SecurityScheme().in(in).name(key); - ValidationResult result = validator.validate(securityScheme); + ValidationResult result = validator.validate(new SecuritySchemeWrapper(null, securityScheme)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -39,7 +39,7 @@ public void testApacheNginxWithDisabledRule(SecurityScheme.In in, String key, bo SecurityScheme securityScheme = new SecurityScheme().in(in).name(key); - ValidationResult result = validator.validate(securityScheme); + ValidationResult result = validator.validate(new SecuritySchemeWrapper(null, securityScheme)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() @@ -58,7 +58,7 @@ public void testDefaultRecommendationApacheNginx(SecurityScheme.In in, String ke SecurityScheme securityScheme = new SecurityScheme().in(in).name(key); - ValidationResult result = validator.validate(securityScheme); + ValidationResult result = validator.validate(new SecuritySchemeWrapper(null, securityScheme)); Assert.assertNotNull(result.getWarnings()); List warnings = result.getWarnings().stream() From 4fa096f604bfe138a7ea6d3a426cfd3caed473ad Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 6 Feb 2020 00:49:52 -0500 Subject: [PATCH 65/72] [bug][kotlin] Fix compile of reserved word in client (#5221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [kotlin] Fix compile of reserved word in client A number of places in the client code need to be escaped for reserved words. That is, this should be: (git log formatted): `as` rather than as (markdown formatted): \`as\` rather than `as` There are only a handful of places using `{{paramName}}` which HTML encodes backticks, rather than `{{{paramName}}}` which outputs literal values. Added unit test to maintain the reserved word standard for Kotlin. * don't use kotlin-codegen-escaped parameters in parameter-map Co-authored-by: Andreas Müller --- .../main/resources/kotlin-client/api.mustache | 20 +- .../jvm-retrofit2/bodyParams.mustache | 2 +- .../jvm-retrofit2/formParams.mustache | 2 +- .../jvm-retrofit2/headerParams.mustache | 2 +- .../jvm-retrofit2/pathParams.mustache | 2 +- .../jvm-retrofit2/queryParams.mustache | 2 +- .../libraries/multiplatform/api.mustache | 16 +- .../kotlin/KotlinReservedWordsTest.java | 128 +++++ .../resources/3_0/kotlin/reserved_words.yaml | 475 ++++++++++++++++++ 9 files changed, 626 insertions(+), 23 deletions(-) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinReservedWordsTest.java create mode 100644 modules/openapi-generator/src/test/resources/3_0/kotlin/reserved_words.yaml diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache index 7d7cec63425b..150fff84dbd6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache @@ -23,7 +23,7 @@ import {{packageName}}.infrastructure.toMultiValue /** * {{summary}} * {{notes}} - {{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{#allParams}}* @param {{{paramName}}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}}* @return {{#returnType}}{{{returnType}}}{{#nullableReturnType}} or null{{/nullableReturnType}}{{/returnType}}{{^returnType}}void{{/returnType}} * @throws UnsupportedOperationException If the API returns an informational or redirection response * @throws ClientException If the API returns a client error response @@ -31,34 +31,34 @@ import {{packageName}}.infrastructure.toMultiValue */{{#returnType}} @Suppress("UNCHECKED_CAST"){{/returnType}} @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} { - val localVariableBody: kotlin.Any? = {{#hasBodyParam}}{{#bodyParams}}{{paramName}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}null{{/hasFormParams}}{{#hasFormParams}}mapOf({{#formParams}}"{{{baseName}}}" to "${{paramName}}"{{#hasMore}}, {{/hasMore}}{{/formParams}}){{/hasFormParams}}{{/hasBodyParam}} + fun {{operationId}}({{#allParams}}{{{paramName}}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} { + val localVariableBody: kotlin.Any? = {{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}null{{/hasFormParams}}{{#hasFormParams}}mapOf({{#formParams}}"{{{baseName}}}" to "${{{paramName}}}"{{#hasMore}}, {{/hasMore}}{{/formParams}}){{/hasFormParams}}{{/hasBodyParam}} val localVariableQuery: MultiValueMap = {{^hasQueryParams}}mutableMapOf() {{/hasQueryParams}}{{#hasQueryParams}}mutableMapOf>() .apply { {{#queryParams}} {{^required}} - if ({{paramName}} != null) { - put("{{paramName}}", {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString({{paramName}}){{/isDateTime}}{{#isDate}}parseDateToQueryString({{paramName}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{paramName}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + if ({{{paramName}}} != null) { + put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/required}} {{#required}} {{#isNullable}} - if ({{paramName}} != null) { - put("{{paramName}}", {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString({{paramName}}){{/isDateTime}}{{#isDate}}parseDateToQueryString({{paramName}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{paramName}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + if ({{{paramName}}} != null) { + put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) } {{/isNullable}} {{^isNullable}} - put("{{paramName}}", {{#isContainer}}toMultiValue({{paramName}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString({{paramName}}){{/isDateTime}}{{#isDate}}parseDateToQueryString({{paramName}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{paramName}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) + put("{{baseName}}", {{#isContainer}}toMultiValue({{{paramName}}}.toList(), "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf({{#isDateTime}}parseDateToQueryString({{{paramName}}}){{/isDateTime}}{{#isDate}}parseDateToQueryString({{{paramName}}}){{/isDate}}{{^isDateTime}}{{^isDate}}{{{paramName}}}.toString(){{/isDate}}{{/isDateTime}}){{/isContainer}}) {{/isNullable}} {{/required}} {{/queryParams}} } {{/hasQueryParams}} - val localVariableHeaders: MutableMap = mutableMapOf({{#hasFormParams}}"Content-Type" to {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{MediaType}}"{{/consumes.0}}{{/hasFormParams}}{{^hasHeaderParams}}){{/hasHeaderParams}}{{#hasHeaderParams}}{{#hasFormParams}}, {{/hasFormParams}}{{#headerParams}}"{{baseName}}" to {{#isContainer}}{{paramName}}.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}{{paramName}}.toString(){{/isContainer}}{{#hasMore}}, {{/hasMore}}{{/headerParams}}){{/hasHeaderParams}} + val localVariableHeaders: MutableMap = mutableMapOf({{#hasFormParams}}"Content-Type" to {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{MediaType}}"{{/consumes.0}}{{/hasFormParams}}{{^hasHeaderParams}}){{/hasHeaderParams}}{{#hasHeaderParams}}{{#hasFormParams}}, {{/hasFormParams}}{{#headerParams}}"{{baseName}}" to {{#isContainer}}{{{paramName}}}.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}{{{paramName}}}.toString(){{/isContainer}}{{#hasMore}}, {{/hasMore}}{{/headerParams}}){{/hasHeaderParams}} val localVariableConfig = RequestConfig( RequestMethod.{{httpMethod}}, - "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{paramName}}"){{/pathParams}}, + "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{{paramName}}}"){{/pathParams}}, query = localVariableQuery, headers = localVariableHeaders ) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/bodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/bodyParams.mustache index 079fbb1169b5..7e7ea165b4a4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@Body {{paramName}}: {{{dataType}}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@Body {{{paramName}}}: {{{dataType}}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache index 5a7f687061d0..2fc767cb2cfd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{paramName}}: {{{dataType}}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field("{{baseName}}"){{/isMultipart}} {{paramName}}: MultipartBody.Part {{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field("{{baseName}}"){{/isMultipart}} {{{paramName}}}: MultipartBody.Part {{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache index 2b26c446678c..aa5a8e346732 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@Header("{{baseName}}") {{paramName}}: {{{dataType}}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@Header("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache index 996a45473a95..9712828b56cd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}@Path("{{baseName}}") {{paramName}}: {{{dataType}}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}@Path("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParams.mustache index 14c40f05e588..b5bace590c56 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@Query("{{baseName}}") {{paramName}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@Query("{{baseName}}") {{{paramName}}}: {{#collectionFormat}}{{#isCollectionFormatMulti}}{{{dataType}}}{{/isCollectionFormatMulti}}{{^isCollectionFormatMulti}}{{{collectionFormat.toUpperCase}}}Params{{/isCollectionFormatMulti}}{{/collectionFormat}}{{^collectionFormat}}{{{dataType}}}{{/collectionFormat}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache index e49cc83507b8..aac93219b677 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache @@ -33,30 +33,30 @@ import kotlinx.serialization.internal.StringDescriptor /** * {{summary}} * {{notes}} - {{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{#allParams}}* @param {{{paramName}}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}}* @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} */ {{#returnType}} @Suppress("UNCHECKED_CAST") {{/returnType}} - suspend fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : HttpResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> { + suspend fun {{operationId}}({{#allParams}}{{{paramName}}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : HttpResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> { val localVariableAuthNames = listOf({{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}}) - val localVariableBody = {{#hasBodyParam}}{{#bodyParam}}{{#isListContainer}}{{operationIdCamelCase}}Request({{paramName}}.asList()){{/isListContainer}}{{^isListContainer}}{{#isMapContainer}}{{operationIdCamelCase}}Request({{paramName}}){{/isMapContainer}}{{^isMapContainer}}{{paramName}}{{/isMapContainer}}{{/isListContainer}}{{/bodyParam}}{{/hasBodyParam}} + val localVariableBody = {{#hasBodyParam}}{{#bodyParam}}{{#isListContainer}}{{operationIdCamelCase}}Request({{{paramName}}}.asList()){{/isListContainer}}{{^isListContainer}}{{#isMapContainer}}{{operationIdCamelCase}}Request({{{paramName}}}){{/isMapContainer}}{{^isMapContainer}}{{{paramName}}}{{/isMapContainer}}{{/isListContainer}}{{/bodyParam}}{{/hasBodyParam}} {{^hasBodyParam}} {{#hasFormParams}} {{#isMultipart}} formData { {{#formParams}} - {{paramName}}?.apply { append("{{{baseName}}}", {{paramName}}) } + {{{paramName}}}?.apply { append("{{{baseName}}}", {{{paramName}}}) } {{/formParams}} } {{/isMultipart}} {{^isMultipart}} ParametersBuilder().also { {{#formParams}} - {{paramName}}?.apply { it.append("{{{baseName}}}", {{paramName}}.toString()) } + {{{paramName}}}?.apply { it.append("{{{baseName}}}", {{{paramName}}}.toString()) } {{/formParams}} }.build() {{/isMultipart}} @@ -68,17 +68,17 @@ import kotlinx.serialization.internal.StringDescriptor val localVariableQuery = mutableMapOf>() {{#queryParams}} - {{paramName}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf("${{paramName}}"){{/isContainer}} } + {{{paramName}}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf("${{{paramName}}}"){{/isContainer}} } {{/queryParams}} val localVariableHeaders = mutableMapOf() {{#headerParams}} - {{paramName}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } + {{{paramName}}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } {{/headerParams}} val localVariableConfig = RequestConfig( RequestMethod.{{httpMethod}}, - "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{paramName}}"){{/pathParams}}, + "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{{paramName}}}"){{/pathParams}}, query = localVariableQuery, headers = localVariableHeaders ) 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 new file mode 100644 index 000000000000..3a54bc8994aa --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinReservedWordsTest.java @@ -0,0 +1,128 @@ +package org.openapitools.codegen.kotlin; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; +import org.openapitools.codegen.*; +import org.openapitools.codegen.languages.KotlinClientCodegen; +import org.openapitools.codegen.utils.StringUtils; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.util.HashSet; + +import static org.testng.Assert.assertEquals; + +@SuppressWarnings("rawtypes") +public class KotlinReservedWordsTest { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/kotlin/reserved_words.yaml"); + + @DataProvider(name = "reservedWords") + static Object[][] reservedWords() { + return new Object[][]{ + {"as"}, + {"break"}, + {"class"}, + {"continue"}, + {"do"}, + {"else"}, + {"false"}, + {"for"}, + {"fun"}, + {"if"}, + {"in"}, + {"interface"}, + {"is"}, + {"null"}, + {"object"}, + {"package"}, + {"return"}, + {"super"}, + {"this"}, + {"throw"}, + {"true"}, + {"try"}, + {"typealias"}, + {"typeof"}, + {"val"}, + {"var"}, + {"when"}, + {"while"} + }; + } + + @Test(dataProvider = "reservedWords") + public void testReservedWordsAsModels(String reservedWord) { + final DefaultCodegen codegen = new KotlinClientCodegen(); + final Schema schema = new Schema(); + final String escaped = "`" + reservedWord + "`"; + final String titleCased = StringUtils.camelize(reservedWord, false); + + codegen.setOpenAPI(openAPI); + CodegenModel model = codegen.fromModel(reservedWord, schema); + + assertEquals(model.classname, titleCased); + if ("class".equals(reservedWord)) { + // this is a really weird "edge" case rename. + assertEquals(model.classVarName, "propertyClass"); + } else { + assertEquals(model.classVarName, escaped); + } + assertEquals(model.name, escaped); + assertEquals(model.classFilename, titleCased); + } + + @SuppressWarnings("OptionalGetWithoutIsPresent") + @Test(dataProvider = "reservedWords") + public void testReservedWordsAsParameters(String reservedWord) { + final DefaultCodegen codegen = new KotlinClientCodegen(); + final String escaped = "`" + reservedWord + "`"; + codegen.setOpenAPI(openAPI); + Operation operation = openAPI.getPaths().get("/ping").getGet(); + + Parameter current = operation.getParameters().stream().filter(x -> reservedWord.equals(x.getName())).findFirst().get(); + CodegenParameter codegenParameter = codegen.fromParameter(current, new HashSet<>()); + + assertEquals(current.getName(), reservedWord); + if ("class".equals(reservedWord)) { + assertEquals(codegenParameter.paramName, "propertyClass"); + } else { + assertEquals(codegenParameter.paramName, escaped); + } + } + + @Test(dataProvider = "reservedWords") + public void testReservedWordsAsProperties(String reservedWord) { + final DefaultCodegen codegen = new KotlinClientCodegen(); + + final String escaped = "`" + reservedWord + "`"; + final String titleCased = StringUtils.camelize(reservedWord, false); + + Schema linked = openAPI.getComponents().getSchemas().get("Linked"); + + CodegenProperty property = codegen.fromProperty(reservedWord, (Schema) linked.getProperties().get(reservedWord)); + + if ("object".equals(reservedWord)) { + assertEquals(property.complexType, "kotlin.Any"); + assertEquals(property.dataType, "kotlin.Any"); + assertEquals(property.datatypeWithEnum, "kotlin.Any"); + assertEquals(property.baseType, "kotlin.Any"); + } else { + assertEquals(property.complexType, titleCased); + assertEquals(property.dataType, titleCased); + assertEquals(property.datatypeWithEnum, titleCased); + assertEquals(property.baseType, titleCased); + } + + if ("class".equals(reservedWord)) { + // this is a really weird "edge" case rename. + assertEquals(property.name, "propertyClass"); + } else { + assertEquals(property.name, escaped); + } + + assertEquals(property.baseName, reservedWord); + } + +} 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 new file mode 100644 index 000000000000..c4022711783c --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/reserved_words.yaml @@ -0,0 +1,475 @@ +openapi: 3.0.1 +info: + title: Test for Kotlin reserved words + version: 1.0.0 +paths: + /ping: + get: + summary: Ping + description: Pingy Ping + parameters: + - name: as + in: header + schema: + type: string + - name: break + in: header + schema: + type: string + - name: class + in: header + schema: + type: string + - name: continue + in: header + schema: + type: string + - name: do + in: header + schema: + type: string + - name: else + in: header + schema: + type: string + - name: "false" + in: header + schema: + type: string + - name: for + in: header + schema: + type: string + - name: fun + in: header + schema: + type: string + - name: if + in: header + schema: + type: string + - name: in + in: header + schema: + type: string + - name: interface + in: header + schema: + type: string + - name: is + in: header + schema: + type: string + - name: "null" + in: header + schema: + type: string + - name: object + in: header + schema: + type: string + - name: package + in: header + schema: + type: string + - name: return + in: header + schema: + type: string + - name: super + in: header + schema: + type: string + - name: this + in: header + schema: + type: string + - name: throw + in: header + schema: + type: string + - name: "true" + in: header + schema: + type: string + - name: try + in: header + schema: + type: string + - name: typealias + in: header + schema: + type: string + - name: typeof + in: header + schema: + type: string + - name: val + in: header + schema: + type: string + - name: var + in: header + schema: + type: string + - name: when + in: header + schema: + type: string + - name: while + in: header + schema: + type: string + responses: + '200': + $ref: "#/components/schemas/Good" + +components: + schemas: + Good: + description: OK, Good + type: object + properties: + as: + type: string + break: + type: string + class: + type: string + continue: + type: string + do: + type: string + else: + type: string + false: + type: string + for: + type: string + fun: + type: string + if: + type: string + in: + type: string + interface: + type: string + is: + type: string + null: + type: string + object: + type: string + package: + type: string + return: + type: string + super: + type: string + this: + type: string + throw: + type: string + true: + type: string + try: + type: string + typealias: + type: string + typeof: + type: string + val: + type: string + var: + type: string + when: + type: string + while: + type: string + linked: + $ref: '#/components/schemas/Linked' + + Linked: + description: Refernce links + type: object + properties: + as: + $ref: '#/components/schemas/as' + break: + $ref: '#/components/schemas/break' + class: + $ref: '#/components/schemas/class' + continue: + $ref: '#/components/schemas/continue' + do: + $ref: '#/components/schemas/do' + else: + $ref: '#/components/schemas/else' + false: + $ref: '#/components/schemas/false' + for: + $ref: '#/components/schemas/for' + fun: + $ref: '#/components/schemas/fun' + if: + $ref: '#/components/schemas/if' + in: + $ref: '#/components/schemas/in' + interface: + $ref: '#/components/schemas/interface' + is: + $ref: '#/components/schemas/is' + null: + $ref: '#/components/schemas/null' + object: + $ref: '#/components/schemas/object' + package: + $ref: '#/components/schemas/package' + return: + $ref: '#/components/schemas/return' + super: + $ref: '#/components/schemas/super' + this: + $ref: '#/components/schemas/this' + throw: + $ref: '#/components/schemas/throw' + true: + $ref: '#/components/schemas/true' + try: + $ref: '#/components/schemas/try' + typealias: + $ref: '#/components/schemas/typealias' + typeof: + $ref: '#/components/schemas/typeof' + val: + $ref: '#/components/schemas/val' + var: + $ref: '#/components/schemas/var' + when: + $ref: '#/components/schemas/when' + while: + $ref: '#/components/schemas/while' + + as: + title: Testing reserved word 'as' + type: object + properties: + id: + type: integer + format: int64 + + break: + title: Testing reserved word 'break' + type: object + properties: + id: + type: integer + format: int64 + + class: + title: Testing reserved word 'class' + type: object + properties: + id: + type: integer + format: int64 + + continue: + title: Testing reserved word 'continue' + type: object + properties: + id: + type: integer + format: int64 + + do: + title: Testing reserved word 'do' + type: object + properties: + id: + type: integer + format: int64 + + else: + title: Testing reserved word 'else' + type: object + properties: + id: + type: integer + format: int64 + + false: + title: Testing reserved word 'false' + type: object + properties: + id: + type: integer + format: int64 + + for: + title: Testing reserved word 'for' + type: object + properties: + id: + type: integer + format: int64 + + fun: + title: Testing reserved word 'fun' + type: object + properties: + id: + type: integer + format: int64 + + if: + title: Testing reserved word 'if' + type: object + properties: + id: + type: integer + format: int64 + + in: + title: Testing reserved word 'in' + type: object + properties: + id: + type: integer + format: int64 + + interface: + title: Testing reserved word 'interface' + type: object + properties: + id: + type: integer + format: int64 + + is: + title: Testing reserved word 'is' + type: object + properties: + id: + type: integer + format: int64 + + null: + title: Testing reserved word 'null' + type: object + properties: + id: + type: integer + format: int64 + + object: + title: Testing reserved word 'object' + type: object + properties: + id: + type: integer + format: int64 + + package: + title: Testing reserved word 'package' + type: object + properties: + id: + type: integer + format: int64 + + return: + title: Testing reserved word 'return' + type: object + properties: + id: + type: integer + format: int64 + + super: + title: Testing reserved word 'super' + type: object + properties: + id: + type: integer + format: int64 + + this: + title: Testing reserved word 'this' + type: object + properties: + id: + type: integer + format: int64 + + throw: + title: Testing reserved word 'throw' + type: object + properties: + id: + type: integer + format: int64 + + true: + title: Testing reserved word 'true' + type: object + properties: + id: + type: integer + format: int64 + + try: + title: Testing reserved word 'try' + type: object + properties: + id: + type: integer + format: int64 + + typealias: + title: Testing reserved word 'typealias' + type: object + properties: + id: + type: integer + format: int64 + + typeof: + title: Testing reserved word 'typeof' + type: object + properties: + id: + type: integer + format: int64 + + val: + title: Testing reserved word 'val' + type: object + properties: + id: + type: integer + format: int64 + + var: + title: Testing reserved word 'var' + type: object + properties: + id: + type: integer + format: int64 + + when: + title: Testing reserved word 'when' + type: object + properties: + id: + type: integer + format: int64 + + while: + title: Testing reserved word 'while' + type: object + properties: + id: + type: integer + format: int64 \ No newline at end of file From 7799ddebe12404851e410bcbda840de773552471 Mon Sep 17 00:00:00 2001 From: Dheeraj Nalluri Date: Thu, 6 Feb 2020 03:20:30 -0600 Subject: [PATCH 66/72] [typescript-angular] Use security scheme name for API key lookup (#5220) * [typescript-angular] Use security scheme name when looking up API keys. * [typescript-angular] Updated samples. --- .../typescript-angular/api.service.mustache | 15 ++++++++------- .../default/api/pet.service.ts | 7 +++++-- .../default/api/store.service.ts | 7 +++++-- .../typescript-angular-v2/npm/api/pet.service.ts | 7 +++++-- .../npm/api/store.service.ts | 7 +++++-- .../with-interfaces/api/pet.service.ts | 7 +++++-- .../with-interfaces/api/store.service.ts | 7 +++++-- .../npm/api/pet.service.ts | 7 +++++-- .../npm/api/store.service.ts | 7 +++++-- .../typescript-angular-v4/npm/api/pet.service.ts | 7 +++++-- .../npm/api/store.service.ts | 7 +++++-- .../builds/default/api/pet.service.ts | 7 +++++-- .../builds/default/api/store.service.ts | 7 +++++-- .../builds/with-npm/api/pet.service.ts | 7 +++++-- .../builds/with-npm/api/store.service.ts | 7 +++++-- .../builds/default/api/pet.service.ts | 7 +++++-- .../builds/default/api/store.service.ts | 7 +++++-- .../builds/with-npm/api/pet.service.ts | 7 +++++-- .../builds/with-npm/api/store.service.ts | 7 +++++-- .../builds/default/api/pet.service.ts | 7 +++++-- .../builds/default/api/store.service.ts | 7 +++++-- .../builds/with-npm/api/pet.service.ts | 7 +++++-- .../builds/with-npm/api/store.service.ts | 7 +++++-- .../builds/default/api/pet.service.ts | 7 +++++-- .../builds/default/api/store.service.ts | 7 +++++-- .../builds/with-npm/api/pet.service.ts | 7 +++++-- .../builds/with-npm/api/store.service.ts | 7 +++++-- .../single-request-parameter/api/pet.service.ts | 7 +++++-- .../single-request-parameter/api/store.service.ts | 7 +++++-- .../builds/with-npm/api/pet.service.ts | 7 +++++-- .../builds/with-npm/api/store.service.ts | 7 +++++-- .../with-prefixed-module-name/api/pet.service.ts | 7 +++++-- .../api/store.service.ts | 7 +++++-- 33 files changed, 168 insertions(+), 71 deletions(-) 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 38ffa081b85a..35c15e870c65 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 @@ -278,18 +278,19 @@ export class {{classname}} { {{#authMethods}} // authentication ({{name}}) required {{#isApiKey}} + if (this.configuration.apiKeys) { + {{! Fallback behaviour may be removed for 5.0 release. See #5062 }} + const key: string | undefined = this.configuration.apiKeys["{{name}}"] || this.configuration.apiKeys["{{keyParamName}}"]; + if (key) { {{#isKeyInHeader}} - if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) { - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]); - } - + {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', key); {{/isKeyInHeader}} {{#isKeyInQuery}} - if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) { - {{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]); + {{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', key); +{{/isKeyInQuery}} + } } -{{/isKeyInQuery}} {{/isApiKey}} {{#isBasic}} {{#isBasicBasic}} diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index a2a05d7464ed..8a80a3026a05 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -468,8 +468,11 @@ export class PetService { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts index 3cff4ba2c0ea..0d64a469bdff 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts @@ -199,8 +199,11 @@ export class StoreService { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index a2a05d7464ed..8a80a3026a05 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -468,8 +468,11 @@ export class PetService { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts index 3cff4ba2c0ea..0d64a469bdff 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts @@ -199,8 +199,11 @@ export class StoreService { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index b3230d244e2a..2d153ab2ba5f 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -471,8 +471,11 @@ export class PetService implements PetServiceInterface { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts index f945e50874c8..5aa28658557e 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts @@ -202,8 +202,11 @@ export class StoreService implements StoreServiceInterface { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts index b5bf94fba2c6..b19fbc6c6bfe 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts @@ -358,8 +358,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts index 6e521f729e49..2a335a30d08b 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts @@ -142,8 +142,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts index a2a05d7464ed..8a80a3026a05 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts @@ -468,8 +468,11 @@ export class PetService { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts index 3cff4ba2c0ea..0d64a469bdff 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts @@ -199,8 +199,11 @@ export class StoreService { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index 35d6f883accc..8f9c55158bb3 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -358,8 +358,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts index 22db3e3008b2..d27113a8b528 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts @@ -142,8 +142,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index 35d6f883accc..8f9c55158bb3 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -358,8 +358,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts index 22db3e3008b2..d27113a8b528 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -142,8 +142,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index 91bbce5b7476..1d81cf38c3d6 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -360,8 +360,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts index d169e06083a5..c6e1ea7214e6 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts @@ -144,8 +144,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index 91bbce5b7476..1d81cf38c3d6 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -360,8 +360,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts index d169e06083a5..c6e1ea7214e6 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts @@ -144,8 +144,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts index 35d6f883accc..8f9c55158bb3 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts @@ -358,8 +358,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts index 22db3e3008b2..d27113a8b528 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts @@ -142,8 +142,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts index 35d6f883accc..8f9c55158bb3 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -358,8 +358,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts index 22db3e3008b2..d27113a8b528 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -142,8 +142,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts index 91bbce5b7476..1d81cf38c3d6 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts @@ -360,8 +360,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts index d169e06083a5..c6e1ea7214e6 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts @@ -144,8 +144,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts index 91bbce5b7476..1d81cf38c3d6 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts @@ -360,8 +360,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts index d169e06083a5..c6e1ea7214e6 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts @@ -144,8 +144,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts index 0e2f4d61ae20..7457b9bf3c43 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts @@ -402,8 +402,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts index ec3164d42299..b0d5dd8b4e50 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts @@ -157,8 +157,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts index 91bbce5b7476..1d81cf38c3d6 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts @@ -360,8 +360,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts index d169e06083a5..c6e1ea7214e6 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts @@ -144,8 +144,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts index 91bbce5b7476..1d81cf38c3d6 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts @@ -360,8 +360,11 @@ export class PetService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts index d169e06083a5..c6e1ea7214e6 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts @@ -144,8 +144,11 @@ export class StoreService { let headers = this.defaultHeaders; // authentication (api_key) required - if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) { - headers = headers.set('api_key', this.configuration.apiKeys["api_key"]); + if (this.configuration.apiKeys) { + const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; + if (key) { + headers = headers.set('api_key', key); + } } let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; From 8779fc6485543a304ffbf410bedf420c5d2bd18c Mon Sep 17 00:00:00 2001 From: mcpummec Date: Thu, 6 Feb 2020 14:43:10 +0100 Subject: [PATCH 67/72] pass key to http params for date objects (#5225) --- .../src/main/resources/typescript-angular/api.service.mustache | 2 +- .../petstore/typescript-angular-v2/default/api/pet.service.ts | 2 +- .../petstore/typescript-angular-v2/default/api/store.service.ts | 2 +- .../petstore/typescript-angular-v2/default/api/user.service.ts | 2 +- .../petstore/typescript-angular-v2/npm/api/pet.service.ts | 2 +- .../petstore/typescript-angular-v2/npm/api/store.service.ts | 2 +- .../petstore/typescript-angular-v2/npm/api/user.service.ts | 2 +- .../typescript-angular-v2/with-interfaces/api/pet.service.ts | 2 +- .../typescript-angular-v2/with-interfaces/api/store.service.ts | 2 +- .../typescript-angular-v2/with-interfaces/api/user.service.ts | 2 +- .../petstore/typescript-angular-v4.3/npm/api/pet.service.ts | 2 +- .../petstore/typescript-angular-v4.3/npm/api/store.service.ts | 2 +- .../petstore/typescript-angular-v4.3/npm/api/user.service.ts | 2 +- .../petstore/typescript-angular-v4/npm/api/pet.service.ts | 2 +- .../petstore/typescript-angular-v4/npm/api/store.service.ts | 2 +- .../petstore/typescript-angular-v4/npm/api/user.service.ts | 2 +- .../builds/default/api/pet.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/user.service.ts | 2 +- .../builds/with-npm/api/pet.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../builds/with-npm/api/user.service.ts | 2 +- .../builds/default/api/pet.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/user.service.ts | 2 +- .../builds/with-npm/api/pet.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../builds/with-npm/api/user.service.ts | 2 +- .../builds/default/api/pet.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/user.service.ts | 2 +- .../builds/with-npm/api/pet.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../builds/with-npm/api/user.service.ts | 2 +- .../builds/default/api/pet.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/user.service.ts | 2 +- .../builds/with-npm/api/pet.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../builds/with-npm/api/user.service.ts | 2 +- .../builds/single-request-parameter/api/pet.service.ts | 2 +- .../builds/single-request-parameter/api/store.service.ts | 2 +- .../builds/single-request-parameter/api/user.service.ts | 2 +- .../builds/with-npm/api/pet.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../builds/with-npm/api/user.service.ts | 2 +- .../builds/with-prefixed-module-name/api/pet.service.ts | 2 +- .../builds/with-prefixed-module-name/api/store.service.ts | 2 +- .../builds/with-prefixed-module-name/api/user.service.ts | 2 +- 49 files changed, 49 insertions(+), 49 deletions(-) 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 35c15e870c65..f42d1beef9c5 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 @@ -152,7 +152,7 @@ export class {{classname}} { {{/useHttpClient}} private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { {{#useHttpClient}}httpParams = {{/useHttpClient}}this.addToHttpParamsRecursive(httpParams, value); } else { {{#useHttpClient}}httpParams = {{/useHttpClient}}this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index 8a80a3026a05..128c4d58bf75 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -205,7 +205,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts index 0d64a469bdff..839adc057180 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts @@ -117,7 +117,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts index 0b4f7dd74b11..710aeb4230f0 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts @@ -187,7 +187,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index 8a80a3026a05..128c4d58bf75 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -205,7 +205,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts index 0d64a469bdff..839adc057180 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts @@ -117,7 +117,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts index 0b4f7dd74b11..710aeb4230f0 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts @@ -187,7 +187,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index 2d153ab2ba5f..086bd8e2a1f2 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -208,7 +208,7 @@ export class PetService implements PetServiceInterface { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts index 5aa28658557e..ead1cdc159cf 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts @@ -120,7 +120,7 @@ export class StoreService implements StoreServiceInterface { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts index 541eafd71dee..768b31b7f462 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts @@ -190,7 +190,7 @@ export class UserService implements UserServiceInterface { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts index b19fbc6c6bfe..8b42e025da44 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts @@ -62,7 +62,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts index 2a335a30d08b..2b7f36b3d93c 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts @@ -48,7 +48,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts index 4ad369e9cdf8..a804d609ba25 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts @@ -48,7 +48,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts index 8a80a3026a05..128c4d58bf75 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts @@ -205,7 +205,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts index 0d64a469bdff..839adc057180 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts @@ -117,7 +117,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts index 0b4f7dd74b11..710aeb4230f0 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts @@ -187,7 +187,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { this.addToHttpParamsRecursive(httpParams, value); } else { this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index 8f9c55158bb3..2bd3a86ebecc 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -62,7 +62,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts index d27113a8b528..cf23ee1866dd 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts @@ -48,7 +48,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts index 50ba2dfddcd1..2c1cd08a6d76 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts @@ -48,7 +48,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index 8f9c55158bb3..2bd3a86ebecc 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -62,7 +62,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts index d27113a8b528..cf23ee1866dd 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -48,7 +48,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts index 50ba2dfddcd1..2c1cd08a6d76 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -48,7 +48,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index 1d81cf38c3d6..48bd11c0d764 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -64,7 +64,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts index c6e1ea7214e6..0dd112aacc04 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts @@ -50,7 +50,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts index 91092c93225f..af96edfb150b 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts @@ -50,7 +50,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index 1d81cf38c3d6..48bd11c0d764 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -64,7 +64,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts index c6e1ea7214e6..0dd112aacc04 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts @@ -50,7 +50,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts index 91092c93225f..af96edfb150b 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts @@ -50,7 +50,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts index 8f9c55158bb3..2bd3a86ebecc 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts @@ -62,7 +62,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts index d27113a8b528..cf23ee1866dd 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts @@ -48,7 +48,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts index 50ba2dfddcd1..2c1cd08a6d76 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts @@ -48,7 +48,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts index 8f9c55158bb3..2bd3a86ebecc 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -62,7 +62,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts index d27113a8b528..cf23ee1866dd 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -48,7 +48,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts index 50ba2dfddcd1..2c1cd08a6d76 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -48,7 +48,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts index 1d81cf38c3d6..48bd11c0d764 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts @@ -64,7 +64,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts index c6e1ea7214e6..0dd112aacc04 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts @@ -50,7 +50,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts index 91092c93225f..af96edfb150b 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts @@ -50,7 +50,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts index 1d81cf38c3d6..48bd11c0d764 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts @@ -64,7 +64,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts index c6e1ea7214e6..0dd112aacc04 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts @@ -50,7 +50,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts index 91092c93225f..af96edfb150b 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts @@ -50,7 +50,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts index 7457b9bf3c43..ee9aa6a7313c 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts @@ -101,7 +101,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts index b0d5dd8b4e50..6b2fbf75328b 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts @@ -62,7 +62,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts index 641080f297b1..57cc0634a03e 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts @@ -80,7 +80,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts index 1d81cf38c3d6..48bd11c0d764 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts @@ -64,7 +64,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts index c6e1ea7214e6..0dd112aacc04 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts @@ -50,7 +50,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts index 91092c93225f..af96edfb150b 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts @@ -50,7 +50,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts index 1d81cf38c3d6..48bd11c0d764 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts @@ -64,7 +64,7 @@ export class PetService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts index c6e1ea7214e6..0dd112aacc04 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts @@ -50,7 +50,7 @@ export class StoreService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts index 91092c93225f..af96edfb150b 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts @@ -50,7 +50,7 @@ export class UserService { private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object") { + if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); From 1bba3a563e51666ce245ebae8eba15a09c5db402 Mon Sep 17 00:00:00 2001 From: Aleksandr Nekrasov Date: Thu, 6 Feb 2020 21:15:43 +0700 Subject: [PATCH 68/72] [scala] fix akka-scala-client template compilation warnings (#5106) * fix akka-scala-client template compilation warnings add COOKIE location authorization key regenerate template * fix scala akka-http client model imports * fix #4004 custom package name in reference.conf * fix scaka-akka codegen test --- .../languages/ScalaAkkaClientCodegen.java | 7 +-- .../resources/scala-akka-client/api.mustache | 2 +- .../scala-akka-client/apiInvoker.mustache | 44 ++++++++------- .../scala-akka-client/model.mustache | 5 +- .../scala-akka-client/requests.mustache | 2 + .../src/test/resources/3_0/petstore.yaml | 18 +++++++ .../resources/codegen/scala/SomeObj.scala.txt | 3 +- samples/client/petstore/scala-akka/README.md | 8 +++ .../scala-akka/project/build.properties | 2 +- .../org/openapitools/client/api/PetApi.scala | 20 ++++--- .../openapitools/client/api/StoreApi.scala | 6 +-- .../org/openapitools/client/api/UserApi.scala | 54 ++++++++++++++----- .../openapitools/client/core/ApiInvoker.scala | 44 ++++++++------- .../openapitools/client/core/requests.scala | 2 + .../client/model/ApiResponse.scala | 2 - .../openapitools/client/model/Category.scala | 2 - .../client/model/InlineObject.scala | 23 ++++++++ .../client/model/InlineObject1.scala | 24 +++++++++ .../org/openapitools/client/model/Order.scala | 3 +- .../org/openapitools/client/model/Pet.scala | 2 - .../org/openapitools/client/model/Tag.scala | 2 - .../org/openapitools/client/model/User.scala | 2 - .../src/test/scala/PetApiTest.scala | 29 +++++----- 23 files changed, 202 insertions(+), 104 deletions(-) create mode 100644 samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject.scala create mode 100644 samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject1.scala diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index 2d291924a7c7..fa18c5432fad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -150,12 +150,13 @@ public void processOpts() { super.processOpts(); if (additionalProperties.containsKey("mainPackage")) { setMainPackage((String) additionalProperties.get("mainPackage")); + additionalProperties.replace("configKeyPath", this.configKeyPath); apiPackage = mainPackage + ".api"; modelPackage = mainPackage + ".model"; invokerPackage = mainPackage + ".core"; additionalProperties.put("apiPackage", apiPackage); - additionalProperties.put("modelPackage", apiPackage); - additionalProperties.put("invokerPackage", apiPackage); + additionalProperties.put("modelPackage", modelPackage); + additionalProperties.put("invokerPackage", invokerPackage); } supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); @@ -366,6 +367,6 @@ public String escapeQuotationMark(String input) { } public void setMainPackage(String mainPackage) { - this.mainPackage = mainPackage; + this.configKeyPath = this.mainPackage = mainPackage; } } diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache index b9211855b8b6..506776b33a06 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache @@ -22,7 +22,7 @@ class {{classname}}(baseUrl: String) { {{/javadocRenderer}} def {{operationId}}({{>methodParameters}}): ApiRequest[{{>operationReturnType}}] = ApiRequest[{{>operationReturnType}}](ApiMethods.{{httpMethod.toUpperCase}}, baseUrl, "{{{path}}}", {{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{^consumes}}"application/json"{{/consumes}}) - {{#authMethods}}{{#isApiKey}}.withApiKey(apiKey, "{{keyParamName}}", {{#isKeyInQuery}}QUERY{{/isKeyInQuery}}{{#isKeyInHeader}}HEADER{{/isKeyInHeader}}) + {{#authMethods}}{{#isApiKey}}.withApiKey(apiKey, "{{keyParamName}}", {{#isKeyInQuery}}QUERY{{/isKeyInQuery}}{{#isKeyInHeader}}HEADER{{/isKeyInHeader}}{{#isKeyInCookie}}COOKIE{{/isKeyInCookie}}) {{/isApiKey}}{{#isBasic}}.withCredentials(basicAuth) {{/isBasic}}{{/authMethods}}{{#bodyParam}}.withBody({{paramName}}) {{/bodyParam}}{{#formParams}}.withFormParam({{>paramCreation}}) diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache index 701f38ddbd7b..f987e857a3bb 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache @@ -45,7 +45,7 @@ object ApiInvoker { * * @param request the apiRequest to be executed */ - implicit class ApiRequestImprovements[T](request: ApiRequest[T]) { + implicit class ApiRequestImprovements[T: Manifest](request: ApiRequest[T]) { def response(invoker: ApiInvoker)(implicit ec: ExecutionContext, system: ActorSystem): Future[ApiResponse[T]] = response(ec, system, invoker) @@ -67,7 +67,7 @@ object ApiInvoker { def toAkkaHttpMethod: HttpMethod = HttpMethods.getForKey(method.value).getOrElse(HttpMethods.GET) } - case object DateTimeSerializer extends CustomSerializer[DateTime](format => ( { + case object DateTimeSerializer extends CustomSerializer[DateTime](_ => ( { case JString(s) => ISODateTimeFormat.dateOptionalTimeParser().parseDateTime(s) }, { @@ -215,7 +215,7 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC Uri(r.basePath + opPathWithParams).withQuery(query) } - def execute[T](r: ApiRequest[T]): Future[ApiResponse[T]] = { + def execute[T: Manifest](r: ApiRequest[T]): Future[ApiResponse[T]] = { implicit val timeout: Timeout = settings.connectionTimeout val request = createRequest(makeUri(r), r) @@ -239,8 +239,8 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC .flatMap(unmarshallApiResponse(r)) } - def unmarshallApiResponse[T](request: ApiRequest[T])(response: HttpResponse): Future[ApiResponse[T]] = { - def responseForState[V](state: ResponseState, value: V) = { + def unmarshallApiResponse[T: Manifest](request: ApiRequest[T])(response: HttpResponse): Future[ApiResponse[T]] = { + def responseForState[V](state: ResponseState, value: V): ApiResponse[V] = { state match { case ResponseState.Success => ApiResponse(response.status.intValue, value, response.headers.map(header => (header.name, header.value)).toMap) @@ -253,31 +253,29 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC ) } } - + val mf = implicitly(manifest[T]) request - .responseForCode(response.status.intValue) - .map { - case (Manifest.Unit, state: ResponseState) => - // FIXME Casting is ugly, how to do better? - Future(responseForState(state, Unit)).asInstanceOf[Future[ApiResponse[T]]] - case (manifest: Manifest[T], state: ResponseState) => - implicit val m: Unmarshaller[HttpEntity, T] = unmarshaller[T](manifest, serialization, formats) - - Unmarshal(response.entity) - .to[T] - .recoverWith { - case e ⇒ throw ApiError(response.status.intValue, s"Unable to unmarshall content to [$manifest]", Some(response.entity.toString), e) - } - .map(value => responseForState(state, value)) - } - .getOrElse(Future.failed(ApiError(response.status.intValue, "Unexpected response code", Some(response.entity.toString)))) + .responseForCode(response.status.intValue) match { + case Some((Manifest.Unit, state: ResponseState)) => + Future(responseForState(state, Unit).asInstanceOf[ApiResponse[T]]) + case Some((manifest, state: ResponseState)) if manifest == mf => + implicit val m: Unmarshaller[HttpEntity, T] = unmarshaller[T](mf, serialization, formats) + Unmarshal(response.entity) + .to[T] + .recoverWith { + case e ⇒ throw ApiError(response.status.intValue, s"Unable to unmarshall content to [$manifest]", Some(response.entity.toString), e) + } + .map(value => responseForState(state, value)) + case None | Some(_) => + Future.failed(ApiError(response.status.intValue, "Unexpected response code", Some(response.entity.toString))) + } } } sealed trait CustomContentTypes { protected def normalizedContentType(original: String): ContentType = - ContentType(MediaTypes.forExtension(original), () => HttpCharsets.`UTF-8`) + ContentType(parseContentType(original).mediaType, () => HttpCharsets.`UTF-8`) protected def parseContentType(contentType: String): ContentType = { diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache index f4c9eb919fe2..d5e9b9d3876b 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache @@ -1,9 +1,10 @@ {{>licenseInfo}} package {{package}} +{{#imports}} +import {{import}} +{{/imports}} import {{mainPackage}}.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/requests.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/requests.mustache index 3f7e58056cbf..6c129147b73c 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/requests.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/requests.mustache @@ -85,6 +85,8 @@ object ApiKeyLocations { case object HEADER extends ApiKeyLocation + case object COOKIE extends ApiKeyLocation + } diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml index 88722011083e..8feeb2440f3e 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml @@ -26,6 +26,15 @@ paths: description: '' operationId: addPet responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' '405': description: Invalid input security: @@ -41,6 +50,15 @@ paths: description: '' operationId: updatePet responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' '400': description: Invalid ID supplied '404': diff --git a/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt b/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt index 52725e7e1236..bb7de3621217 100644 --- a/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt +++ b/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt @@ -11,9 +11,8 @@ */ package hello.world.model -import hello.world.core.ApiModel import org.joda.time.DateTime -import java.util.UUID +import hello.world.core.ApiModel case class SomeObj ( `type`: Option[SomeObjEnums.`Type`] = None, diff --git a/samples/client/petstore/scala-akka/README.md b/samples/client/petstore/scala-akka/README.md index a1ab296dc4d8..040074e90ff1 100644 --- a/samples/client/petstore/scala-akka/README.md +++ b/samples/client/petstore/scala-akka/README.md @@ -91,6 +91,8 @@ Class | Method | HTTP request | Description - [ApiResponse](ApiResponse.md) - [Category](Category.md) + - [InlineObject](InlineObject.md) + - [InlineObject1](InlineObject1.md) - [Order](Order.md) - [Pet](Pet.md) - [Tag](Tag.md) @@ -106,6 +108,12 @@ Authentication schemes defined for the API: - **API key parameter name**: api_key - **Location**: HTTP header +### auth_cookie + +- **Type**: API key +- **API key parameter name**: AUTH_KEY +- **Location**: + ## Author diff --git a/samples/client/petstore/scala-akka/project/build.properties b/samples/client/petstore/scala-akka/project/build.properties index c0bab04941d7..00b48d978b25 100644 --- a/samples/client/petstore/scala-akka/project/build.properties +++ b/samples/client/petstore/scala-akka/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.8 +sbt.version=1.3.6 diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala index 658f7fb8fe31..df82ca29fca2 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala @@ -27,13 +27,15 @@ class PetApi(baseUrl: String) { /** * Expected answers: + * code 200 : Pet (successful operation) * code 405 : (Invalid input) * - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store */ - def addPet(body: Pet): ApiRequest[Unit] = - ApiRequest[Unit](ApiMethods.POST, baseUrl, "/pet", "application/json") - .withBody(body) + def addPet(pet: Pet): ApiRequest[Pet] = + ApiRequest[Pet](ApiMethods.POST, baseUrl, "/pet", "application/json") + .withBody(pet) + .withSuccessResponse[Pet](200) .withErrorResponse[Unit](405) @@ -107,15 +109,17 @@ class PetApi(baseUrl: String) { /** * Expected answers: + * code 200 : Pet (successful operation) * code 400 : (Invalid ID supplied) * code 404 : (Pet not found) * code 405 : (Validation exception) * - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store */ - def updatePet(body: Pet): ApiRequest[Unit] = - ApiRequest[Unit](ApiMethods.PUT, baseUrl, "/pet", "application/json") - .withBody(body) + def updatePet(pet: Pet): ApiRequest[Pet] = + ApiRequest[Pet](ApiMethods.PUT, baseUrl, "/pet", "application/json") + .withBody(pet) + .withSuccessResponse[Pet](200) .withErrorResponse[Unit](400) .withErrorResponse[Unit](404) .withErrorResponse[Unit](405) diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala index 534b3a4949a7..ba8a34ef6ec8 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala @@ -77,11 +77,11 @@ class StoreApi(baseUrl: String) { * code 200 : Order (successful operation) * code 400 : (Invalid Order) * - * @param body order placed for purchasing the pet + * @param order order placed for purchasing the pet */ - def placeOrder(body: Order): ApiRequest[Order] = + def placeOrder(order: Order): ApiRequest[Order] = ApiRequest[Order](ApiMethods.POST, baseUrl, "/store/order", "application/json") - .withBody(body) + .withBody(order) .withSuccessResponse[Order](200) .withErrorResponse[Unit](400) diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala index 7a1e796b70d4..7a784fd02985 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala @@ -29,11 +29,15 @@ class UserApi(baseUrl: String) { * Expected answers: * code 0 : (successful operation) * - * @param body Created user object + * Available security schemes: + * auth_cookie (apiKey) + * + * @param user Created user object */ - def createUser(body: User): ApiRequest[Unit] = + def createUser(user: User)(implicit apiKey: ApiKeyValue): ApiRequest[Unit] = ApiRequest[Unit](ApiMethods.POST, baseUrl, "/user", "application/json") - .withBody(body) + .withApiKey(apiKey, "AUTH_KEY", COOKIE) + .withBody(user) .withDefaultSuccessResponse[Unit] @@ -41,11 +45,15 @@ class UserApi(baseUrl: String) { * Expected answers: * code 0 : (successful operation) * - * @param body List of user object + * Available security schemes: + * auth_cookie (apiKey) + * + * @param user List of user object */ - def createUsersWithArrayInput(body: Seq[User]): ApiRequest[Unit] = + def createUsersWithArrayInput(user: Seq[User])(implicit apiKey: ApiKeyValue): ApiRequest[Unit] = ApiRequest[Unit](ApiMethods.POST, baseUrl, "/user/createWithArray", "application/json") - .withBody(body) + .withApiKey(apiKey, "AUTH_KEY", COOKIE) + .withBody(user) .withDefaultSuccessResponse[Unit] @@ -53,11 +61,15 @@ class UserApi(baseUrl: String) { * Expected answers: * code 0 : (successful operation) * - * @param body List of user object + * Available security schemes: + * auth_cookie (apiKey) + * + * @param user List of user object */ - def createUsersWithListInput(body: Seq[User]): ApiRequest[Unit] = + def createUsersWithListInput(user: Seq[User])(implicit apiKey: ApiKeyValue): ApiRequest[Unit] = ApiRequest[Unit](ApiMethods.POST, baseUrl, "/user/createWithList", "application/json") - .withBody(body) + .withApiKey(apiKey, "AUTH_KEY", COOKIE) + .withBody(user) .withDefaultSuccessResponse[Unit] @@ -68,10 +80,14 @@ class UserApi(baseUrl: String) { * code 400 : (Invalid username supplied) * code 404 : (User not found) * + * Available security schemes: + * auth_cookie (apiKey) + * * @param username The name that needs to be deleted */ - def deleteUser(username: String): ApiRequest[Unit] = + def deleteUser(username: String)(implicit apiKey: ApiKeyValue): ApiRequest[Unit] = ApiRequest[Unit](ApiMethods.DELETE, baseUrl, "/user/{username}", "application/json") + .withApiKey(apiKey, "AUTH_KEY", COOKIE) .withPathParam("username", username) .withErrorResponse[Unit](400) .withErrorResponse[Unit](404) @@ -97,6 +113,7 @@ class UserApi(baseUrl: String) { * Expected answers: * code 200 : String (successful operation) * Headers : + * Set-Cookie - Cookie authentication key for use with the `auth_cookie` apiKey authentication. * X-Rate-Limit - calls per hour allowed by the user * X-Expires-After - date in UTC when toekn expires * code 400 : (Invalid username/password supplied) @@ -112,6 +129,7 @@ class UserApi(baseUrl: String) { .withErrorResponse[Unit](400) object LoginUserHeaders { + def setCookie(r: ApiReturnWithHeaders) = r.getStringHeader("Set-Cookie") def xRateLimit(r: ApiReturnWithHeaders) = r.getIntHeader("X-Rate-Limit") def xExpiresAfter(r: ApiReturnWithHeaders) = r.getDateTimeHeader("X-Expires-After") } @@ -119,9 +137,13 @@ class UserApi(baseUrl: String) { /** * Expected answers: * code 0 : (successful operation) + * + * Available security schemes: + * auth_cookie (apiKey) */ - def logoutUser(): ApiRequest[Unit] = + def logoutUser()(implicit apiKey: ApiKeyValue): ApiRequest[Unit] = ApiRequest[Unit](ApiMethods.GET, baseUrl, "/user/logout", "application/json") + .withApiKey(apiKey, "AUTH_KEY", COOKIE) .withDefaultSuccessResponse[Unit] @@ -132,12 +154,16 @@ class UserApi(baseUrl: String) { * code 400 : (Invalid user supplied) * code 404 : (User not found) * + * Available security schemes: + * auth_cookie (apiKey) + * * @param username name that need to be deleted - * @param body Updated user object + * @param user Updated user object */ - def updateUser(username: String, body: User): ApiRequest[Unit] = + def updateUser(username: String, user: User)(implicit apiKey: ApiKeyValue): ApiRequest[Unit] = ApiRequest[Unit](ApiMethods.PUT, baseUrl, "/user/{username}", "application/json") - .withBody(body) + .withApiKey(apiKey, "AUTH_KEY", COOKIE) + .withBody(user) .withPathParam("username", username) .withErrorResponse[Unit](400) .withErrorResponse[Unit](404) diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala index 8b6eeee0bb51..cd23dc723d68 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala @@ -55,7 +55,7 @@ object ApiInvoker { * * @param request the apiRequest to be executed */ - implicit class ApiRequestImprovements[T](request: ApiRequest[T]) { + implicit class ApiRequestImprovements[T: Manifest](request: ApiRequest[T]) { def response(invoker: ApiInvoker)(implicit ec: ExecutionContext, system: ActorSystem): Future[ApiResponse[T]] = response(ec, system, invoker) @@ -77,7 +77,7 @@ object ApiInvoker { def toAkkaHttpMethod: HttpMethod = HttpMethods.getForKey(method.value).getOrElse(HttpMethods.GET) } - case object DateTimeSerializer extends CustomSerializer[DateTime](format => ( { + case object DateTimeSerializer extends CustomSerializer[DateTime](_ => ( { case JString(s) => ISODateTimeFormat.dateOptionalTimeParser().parseDateTime(s) }, { @@ -225,7 +225,7 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC Uri(r.basePath + opPathWithParams).withQuery(query) } - def execute[T](r: ApiRequest[T]): Future[ApiResponse[T]] = { + def execute[T: Manifest](r: ApiRequest[T]): Future[ApiResponse[T]] = { implicit val timeout: Timeout = settings.connectionTimeout val request = createRequest(makeUri(r), r) @@ -249,8 +249,8 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC .flatMap(unmarshallApiResponse(r)) } - def unmarshallApiResponse[T](request: ApiRequest[T])(response: HttpResponse): Future[ApiResponse[T]] = { - def responseForState[V](state: ResponseState, value: V) = { + def unmarshallApiResponse[T: Manifest](request: ApiRequest[T])(response: HttpResponse): Future[ApiResponse[T]] = { + def responseForState[V](state: ResponseState, value: V): ApiResponse[V] = { state match { case ResponseState.Success => ApiResponse(response.status.intValue, value, response.headers.map(header => (header.name, header.value)).toMap) @@ -263,31 +263,29 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC ) } } - + val mf = implicitly(manifest[T]) request - .responseForCode(response.status.intValue) - .map { - case (Manifest.Unit, state: ResponseState) => - // FIXME Casting is ugly, how to do better? - Future(responseForState(state, Unit)).asInstanceOf[Future[ApiResponse[T]]] - case (manifest: Manifest[T], state: ResponseState) => - implicit val m: Unmarshaller[HttpEntity, T] = unmarshaller[T](manifest, serialization, formats) - - Unmarshal(response.entity) - .to[T] - .recoverWith { - case e ⇒ throw ApiError(response.status.intValue, s"Unable to unmarshall content to [$manifest]", Some(response.entity.toString), e) - } - .map(value => responseForState(state, value)) - } - .getOrElse(Future.failed(ApiError(response.status.intValue, "Unexpected response code", Some(response.entity.toString)))) + .responseForCode(response.status.intValue) match { + case Some((Manifest.Unit, state: ResponseState)) => + Future(responseForState(state, Unit).asInstanceOf[ApiResponse[T]]) + case Some((manifest, state: ResponseState)) if manifest == mf => + implicit val m: Unmarshaller[HttpEntity, T] = unmarshaller[T](mf, serialization, formats) + Unmarshal(response.entity) + .to[T] + .recoverWith { + case e ⇒ throw ApiError(response.status.intValue, s"Unable to unmarshall content to [$manifest]", Some(response.entity.toString), e) + } + .map(value => responseForState(state, value)) + case None | Some(_) => + Future.failed(ApiError(response.status.intValue, "Unexpected response code", Some(response.entity.toString))) + } } } sealed trait CustomContentTypes { protected def normalizedContentType(original: String): ContentType = - ContentType(MediaTypes.forExtension(original), () => HttpCharsets.`UTF-8`) + ContentType(parseContentType(original).mediaType, () => HttpCharsets.`UTF-8`) protected def parseContentType(contentType: String): ContentType = { diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/requests.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/requests.scala index 155a86dcf112..b0b56b97fd73 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/requests.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/requests.scala @@ -95,6 +95,8 @@ object ApiKeyLocations { case object HEADER extends ApiKeyLocation + case object COOKIE extends ApiKeyLocation + } diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala index 0ef406429cbb..3ddf32c9bda7 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala @@ -12,8 +12,6 @@ package org.openapitools.client.model import org.openapitools.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID case class ApiResponse ( code: Option[Int] = None, diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala index 23ba74821501..e62645a38b2a 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala @@ -12,8 +12,6 @@ package org.openapitools.client.model import org.openapitools.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID case class Category ( id: Option[Long] = None, diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject.scala new file mode 100644 index 000000000000..3d9ec200c9fc --- /dev/null +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject.scala @@ -0,0 +1,23 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.client.model + +import org.openapitools.client.core.ApiModel + +case class InlineObject ( + /* Updated name of the pet */ + name: Option[String] = None, + /* Updated status of the pet */ + status: Option[String] = None +) extends ApiModel + + diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject1.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject1.scala new file mode 100644 index 000000000000..c41794c43d43 --- /dev/null +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/InlineObject1.scala @@ -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.client.model + +import java.io.File +import org.openapitools.client.core.ApiModel + +case class InlineObject1 ( + /* Additional data to pass to server */ + additionalMetadata: Option[String] = None, + /* file to upload */ + file: Option[File] = None +) extends ApiModel + + diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala index 83055706fd1d..6a9fdc141f08 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala @@ -11,9 +11,8 @@ */ package org.openapitools.client.model -import org.openapitools.client.core.ApiModel import org.joda.time.DateTime -import java.util.UUID +import org.openapitools.client.core.ApiModel case class Order ( id: Option[Long] = None, diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala index 1f78a72e57ba..3a78a7c3f183 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala @@ -12,8 +12,6 @@ package org.openapitools.client.model import org.openapitools.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID case class Pet ( id: Option[Long] = None, diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala index 30dfbf441914..ac0c7763720c 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala @@ -12,8 +12,6 @@ package org.openapitools.client.model import org.openapitools.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID case class Tag ( id: Option[Long] = None, diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala index 0d33ce64753e..aad2117b16d5 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala @@ -12,8 +12,6 @@ package org.openapitools.client.model import org.openapitools.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID case class User ( id: Option[Long] = None, diff --git a/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala b/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala index 2cbdacd506ac..9327a6d7585d 100644 --- a/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala +++ b/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala @@ -2,7 +2,7 @@ import akka.actor.ActorSystem import org.junit.runner.RunWith import org.openapitools.client._ import org.openapitools.client.api._ -import org.openapitools.client.core.{ ApiInvoker, ApiKeyValue } +import org.openapitools.client.core.{ApiInvoker, ApiKeyValue} import org.openapitools.client.model._ import org.scalatest.Inspectors._ import org.scalatest._ @@ -14,8 +14,8 @@ class PetApiTest extends AsyncFlatSpec with Matchers { private implicit val system: ActorSystem = ActorSystem() behavior of "PetApi" - val api = PetApi() - val invoker = ApiInvoker() + val api: PetApi = PetApi() + val invoker: ApiInvoker = ApiInvoker(EnumsSerializers.all) private implicit val apiKey: ApiKeyValue = ApiKeyValue("special-key") it should "add and fetch a pet" in { @@ -54,7 +54,7 @@ class PetApiTest extends AsyncFlatSpec with Matchers { } it should "update a pet" in { - val petId = Math.random().toInt + val petId = (Math.random()*1000000000).toLong val createdPet = Pet( Some(petId), Some(Category(Some(1), Some("sold"))), @@ -64,19 +64,24 @@ class PetApiTest extends AsyncFlatSpec with Matchers { Some(PetEnums.Status.Available) ) - for { - _ <- invoker.execute(api.addPet(createdPet)) - pet: core.ApiResponse[Pet] <- invoker.execute(api.getPetById(petId)) - updatedPet = pet.content.copy(status = Some(PetEnums.Status.Sold)) - _ <- invoker.execute(api.updatePet(updatedPet)) - updatedRequested <- invoker.execute(api.getPetById(petId)) + for { + createdPet <- invoker.execute(api.addPet(createdPet)) + pet: core.ApiResponse[Pet] <- invoker.execute(api.getPetById(createdPet.content.id.get)) + updatedPet = pet.content.copy(status = Some(PetEnums.Status.Sold), name = "developer") + updatedPetResponse: core.ApiResponse[Pet] <- invoker.execute(api.updatePet(updatedPet)) + updatedRequested: core.ApiResponse[Pet] <- invoker.execute(api.getPetById(createdPet.content.id.get)) } yield { pet.content.name should be("programmer") pet.content.status should be(Some(PetEnums.Status.Available)) - updatedRequested.content.name should be("programmer") + updatedPetResponse.content.name should be("developer") + updatedPetResponse.content.status should be(Some(PetEnums.Status.Sold)) + + updatedRequested.content.name should be("developer") updatedRequested.content.status should be(Some(PetEnums.Status.Sold)) + } + } it should "find pets by status" in { @@ -90,7 +95,7 @@ class PetApiTest extends AsyncFlatSpec with Matchers { pets should not be empty forAll(pets) { pet => - pet.status should contain("available") + pet.status should contain(PetEnums.Status.Available) } } } From 8d6286dfae0c37d53ce9d27cd00b8e8ef87bcfe1 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 6 Feb 2020 09:52:58 -0500 Subject: [PATCH 69/72] [core] Normalizing vendor extension naming (#5192) * [core] Normalizing vendor extension naming According to [OAS 2.0][1] and [OAS 3.0][2] Specifications: > Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, > for example, x-internal-id. The value can be null, a primitive, an array or an object. > Can have any valid JSON format value. This commit attempts to define a [clear identifier design format][3] of maintaining lower-kebab casing and following the x- prefix defined by OAI Specification. Following a convention that matches that used by others (see [autorest][4]), we will remove any confusion about naming strategies for template authors and customizers. Following the lower-kebab convention will allow us to convert from camelCase and missing prefixes to the desired format. For example, these conversions are simple to make for template consistency: * customValue => x-custom-value * x-customValue => x-custom-value * x-custom-value => x-custom-value This convention also allows us to define a single standard for use across all generators. This means no occurrence of x-operationId in one generator and x-operation-id in another. [1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#patterned-objects [2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions [3]: https://tools.ietf.org/html/draft-wilde-registries-01#section-3.4 [4]: https://github.com/Azure/autorest/tree/master/docs/extensions * Incorporate feedback to avoid race/blocking in OnceLogger * Remove unnecessary additional log config * Add tests,comments for OnceLogger * Test caffeine cache with FakeTicker --- .../src/main/resources/logback.xml | 10 - modules/openapi-generator/pom.xml | 11 + .../languages/AbstractApexCodegen.java | 14 +- .../languages/AbstractCSharpCodegen.java | 6 +- .../languages/AbstractEiffelCodegen.java | 11 +- .../codegen/languages/AbstractGoCodegen.java | 30 ++- .../languages/AbstractJavaCodegen.java | 8 +- .../codegen/languages/AbstractPhpCodegen.java | 8 +- .../languages/Apache2ConfigCodegen.java | 16 +- .../languages/ClojureClientCodegen.java | 24 ++- .../languages/CppPistacheServerCodegen.java | 14 +- .../languages/CppQt5AbstractCodegen.java | 13 +- .../languages/CppRestbedServerCodegen.java | 12 +- .../languages/DartDioClientCodegen.java | 22 +- .../languages/DartJaguarClientCodegen.java | 31 ++- .../codegen/languages/ElmClientCodegen.java | 47 +++-- .../languages/HaskellHttpClientCodegen.java | 191 ++++++++++++------ .../languages/HaskellServantCodegen.java | 26 ++- .../codegen/languages/JavaClientCodegen.java | 14 +- .../languages/JavaPlayFrameworkCodegen.java | 15 +- .../languages/JavascriptClientCodegen.java | 43 +++- .../codegen/languages/MysqlSchemaCodegen.java | 24 ++- .../codegen/languages/OCamlClientCodegen.java | 8 +- .../codegen/languages/ObjcClientCodegen.java | 15 +- .../languages/PhpSymfonyServerCodegen.java | 40 +++- .../codegen/languages/RustClientCodegen.java | 12 +- .../codegen/languages/RustServerCodegen.java | 165 ++++++++++----- .../languages/ScalaFinchServerCodegen.java | 37 +++- .../ScalaPlayFrameworkServerCodegen.java | 21 +- .../languages/StaticHtml2Generator.java | 21 +- .../TypeScriptRxjsClientCodegen.java | 9 +- .../codegen/utils/OnceLogger.java | 173 ++++++++++++++++ .../codegen/utils/OnceLoggerTest.java | 114 +++++++++++ pom.xml | 3 + 34 files changed, 978 insertions(+), 230 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OnceLogger.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/OnceLoggerTest.java diff --git a/modules/openapi-generator-cli/src/main/resources/logback.xml b/modules/openapi-generator-cli/src/main/resources/logback.xml index efa74345a0fe..0577ae5e15d2 100644 --- a/modules/openapi-generator-cli/src/main/resources/logback.xml +++ b/modules/openapi-generator-cli/src/main/resources/logback.xml @@ -53,16 +53,6 @@ ERROR - - System.err - true - - ONCE - - - [%thread] %highlight(%-5level) %logger{36} - %red(%msg)%n - - diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 7aa031395532..171ddf9f4778 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -385,11 +385,22 @@ ${kotlin-version} test + + com.google.guava + guava-testlib + 28.2-jre + test + net.java.dev.jna jna 5.5.0 + + com.github.ben-manes.caffeine + caffeine + 2.8.1 + diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index e8a1aca42d5d..bb2a21d4afa9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -32,6 +32,7 @@ import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public abstract class AbstractApexCodegen extends DefaultCodegen implements CodegenConfig { @@ -455,9 +456,16 @@ public CodegenModel fromModel(String name, Schema model) { } } - cm.vendorExtensions.put("hasPropertyMappings", !propertyMappings.isEmpty()); - cm.vendorExtensions.put("hasDefaultValues", hasDefaultValues); - cm.vendorExtensions.put("propertyMappings", propertyMappings); + // TODO: 5.0: Remove this block and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + cm.vendorExtensions.put("hasPropertyMappings", !propertyMappings.isEmpty()); // TODO: 5.0 Remove + cm.vendorExtensions.put("hasDefaultValues", hasDefaultValues); // TODO: 5.0 Remove + cm.vendorExtensions.put("propertyMappings", propertyMappings); // TODO: 5.0 Remove + + + cm.vendorExtensions.put("x-has-property-mappings", !propertyMappings.isEmpty()); + cm.vendorExtensions.put("x-has-default-values", hasDefaultValues); + cm.vendorExtensions.put("x-property-mappings", propertyMappings); if (!propertyMappings.isEmpty()) { cm.interfaces.add("OAS.MappedProperties"); 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 7e6c09e4aebf..2a0b97066b49 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 @@ -34,6 +34,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public abstract class AbstractCSharpCodegen extends DefaultCodegen implements CodegenConfig { @@ -562,12 +563,15 @@ public void updateCodegenPropertyEnum(CodegenProperty var) { * @param models list of all models */ protected void updateValueTypeProperty(Map models) { + // TODO: 5.0: Remove the camelCased vendorExtension within the below loop and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); for (Map.Entry entry : models.entrySet()) { String openAPIName = entry.getKey(); CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model != null) { for (CodegenProperty var : model.vars) { - var.vendorExtensions.put("isValueType", isValueType(var)); + var.vendorExtensions.put("isValueType", isValueType(var)); // TODO: 5.0 Remove + var.vendorExtensions.put("x-is-value-type", isValueType(var)); } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index b19a6a2404a9..6d8f5e97632b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -31,6 +31,7 @@ import java.util.*; import static com.google.common.base.Strings.isNullOrEmpty; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -234,16 +235,20 @@ public void postProcessParameter(CodegenParameter parameter) { char firstChar = parameter.paramName.charAt(0); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (Character.isUpperCase(firstChar)) { // First char is already uppercase, just use paramName. - parameter.vendorExtensions.put("x-exportParamName", parameter.paramName); - + parameter.vendorExtensions.put("x-exportParamName", parameter.paramName); // TODO: 5.0 Remove + parameter.vendorExtensions.put("x-export-param-name", parameter.paramName); } // It's a lowercase first char, let's convert it to uppercase StringBuilder sb = new StringBuilder(parameter.paramName); sb.setCharAt(0, Character.toUpperCase(firstChar)); - parameter.vendorExtensions.put("x-exportParamName", sb.toString()); + parameter.vendorExtensions.put("x-exportParamName", sb.toString()); // TODO: 5.0 Remove + parameter.vendorExtensions.put("x-export-param-name", sb.toString()); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 24547880a797..5fae7e3a01ca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -29,6 +29,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -388,6 +389,10 @@ public Map postProcessOperationsWithModels(Map o Map objectMap = (Map) objs.get("operations"); @SuppressWarnings("unchecked") List operations = (List) objectMap.get("operation"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenOperation operation : operations) { // http method verb conversion (e.g. PUT => Put) operation.httpMethod = camelize(operation.httpMethod.toLowerCase(Locale.ROOT)); @@ -450,13 +455,16 @@ public Map postProcessOperationsWithModels(Map o imports.add(createMapping("import", "github.com/antihax/optional")); addedOptionalImport = true; } + // We need to specially map Time type to the optionals package if ("time.Time".equals(param.dataType)) { - param.vendorExtensions.put("x-optionalDataType", "Time"); + param.vendorExtensions.put("x-optionalDataType", "Time"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-optional-data-type", "Time"); } else { // Map optional type to dataType - param.vendorExtensions.put("x-optionalDataType", - param.dataType.substring(0, 1).toUpperCase(Locale.ROOT) + param.dataType.substring(1)); + String optionalType = param.dataType.substring(0, 1).toUpperCase(Locale.ROOT) + param.dataType.substring(1); + param.vendorExtensions.put("x-optionalDataType", optionalType); // TODO: 5.0 Remove + param.vendorExtensions.put("x-optional-data-type", optionalType); } } @@ -464,12 +472,14 @@ public Map postProcessOperationsWithModels(Map o char nameFirstChar = param.paramName.charAt(0); if (Character.isUpperCase(nameFirstChar)) { // First char is already uppercase, just use paramName. - param.vendorExtensions.put("x-exportParamName", param.paramName); + param.vendorExtensions.put("x-exportParamName", param.paramName); // TODO: 5.0 Remove + param.vendorExtensions.put("x-export-param-name", param.paramName); } else { // It's a lowercase first char, let's convert it to uppercase StringBuilder sb = new StringBuilder(param.paramName); sb.setCharAt(0, Character.toUpperCase(nameFirstChar)); - param.vendorExtensions.put("x-exportParamName", sb.toString()); + param.vendorExtensions.put("x-exportParamName", sb.toString()); // TODO: 5.0 Remove + param.vendorExtensions.put("x-x-export-param-name", sb.toString()); } } @@ -502,16 +512,22 @@ public Map postProcessOperationsWithModels(Map o } private void setExportParameterName(List codegenParameters) { + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenParameter param : codegenParameters) { char nameFirstChar = param.paramName.charAt(0); if (Character.isUpperCase(nameFirstChar)) { // First char is already uppercase, just use paramName. - param.vendorExtensions.put("x-exportParamName", param.paramName); + param.vendorExtensions.put("x-exportParamName", param.paramName); // TODO: 5.0 Remove + param.vendorExtensions.put("x-export-param-name", param.paramName); } else { // It's a lowercase first char, let's convert it to uppercase StringBuilder sb = new StringBuilder(param.paramName); sb.setCharAt(0, Character.toUpperCase(nameFirstChar)); - param.vendorExtensions.put("x-exportParamName", sb.toString()); + param.vendorExtensions.put("x-exportParamName", sb.toString()); // TODO: 5.0 Remove + param.vendorExtensions.put("x-export-param-name", sb.toString()); } } } 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 af6e1cde6ccf..c79d747db80d 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 @@ -39,6 +39,7 @@ import java.util.*; import java.util.regex.Pattern; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.*; public abstract class AbstractJavaCodegen extends DefaultCodegen implements CodegenConfig { @@ -998,8 +999,13 @@ public CodegenModel fromModel(String name, Schema model) { public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { if (serializeBigDecimalAsString) { if (property.baseType.equals("BigDecimal")) { + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + // we serialize BigDecimal as `string` to avoid precision loss - property.vendorExtensions.put("extraAnnotation", "@JsonSerialize(using = ToStringSerializer.class)"); + property.vendorExtensions.put("extraAnnotation", "@JsonSerialize(using = ToStringSerializer.class)"); // TODO: 5.0 Remove + property.vendorExtensions.put("x-extra-annotation", "@JsonSerialize(using = ToStringSerializer.class)"); // this requires some more imports to be added for this model... model.imports.add("ToStringSerializer"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index aeb076b85063..7b48fba9eaa8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -31,6 +31,7 @@ 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.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -668,10 +669,15 @@ public Map postProcessModels(Map objs) { public Map postProcessOperationsWithModels(Map objs, List allModels) { Map operations = (Map) objs.get("operations"); List operationList = (List) operations.get("operation"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenOperation op : operationList) { // for API test method name // e.g. public function test{{vendorExtensions.x-testOperationId}}() - op.vendorExtensions.put("x-testOperationId", camelize(op.operationId)); + op.vendorExtensions.put("x-testOperationId", camelize(op.operationId)); // TODO: 5.0 Remove + op.vendorExtensions.put("x-test-operation-id", camelize(op.operationId)); } return objs; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java index ebd2cd3b326c..d3bbe7743613 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java @@ -19,12 +19,18 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; + public class Apache2ConfigCodegen extends DefaultCodegen implements CodegenConfig { public static final String USER_INFO_PATH = "userInfoPath"; + private static final Logger LOGGER = LoggerFactory.getLogger(Apache2ConfigCodegen.class); + protected String userInfoPath = "/var/www/html/"; @Override @@ -89,6 +95,10 @@ public Map postProcessOperationsWithModels(Map o Map operations = (Map) objs.get("operations"); List operationList = (List) operations.get("operation"); List newOpList = new ArrayList(); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenOperation op : operationList) { String path = op.path; @@ -101,7 +111,8 @@ public Map postProcessOperationsWithModels(Map o splitPath.add(item); op.path += item + "/"; } - op.vendorExtensions.put("x-codegen-userInfoPath", userInfoPath); + op.vendorExtensions.put("x-codegen-userInfoPath", userInfoPath); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-user-info-path", userInfoPath); boolean foundInNewList = false; for (CodegenOperation op1 : newOpList) { if (!foundInNewList) { @@ -113,7 +124,8 @@ public Map postProcessOperationsWithModels(Map o } op.operationIdCamelCase = op1.operationIdCamelCase; currentOtherMethodList.add(op); - op1.vendorExtensions.put("x-codegen-otherMethods", currentOtherMethodList); + op1.vendorExtensions.put("x-codegen-otherMethods", currentOtherMethodList); // TODO: 5.0 Remove + op1.vendorExtensions.put("x-codegen-other-methods", currentOtherMethodList); } } } 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 6500a8a478cf..48e4a123cdd2 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 @@ -27,14 +27,18 @@ import org.openapitools.codegen.*; 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.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.dashize; import static org.openapitools.codegen.utils.StringUtils.underscore; public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(ClojureClientCodegen.class); private static final String PROJECT_NAME = "projectName"; private static final String PROJECT_DESCRIPTION = "projectDescription"; private static final String PROJECT_VERSION = "projectVersion"; @@ -43,7 +47,8 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi private static final String PROJECT_LICENSE_URL = "projectLicenseUrl"; private static final String BASE_NAMESPACE = "baseNamespace"; - static final String X_BASE_SPEC = "x-baseSpec"; + static final String X_BASE_SPEC = "x-baseSpec"; // TODO: 5.0 Remove + static final String VENDOR_EXTENSION_X_BASE_SPEC = "x-base-spec"; static final String X_MODELS = "x-models"; protected String projectName; @@ -198,19 +203,16 @@ public String toModelName(String name) { public CodegenModel fromModel(String name, Schema mod) { CodegenModel model = super.fromModel(name, mod); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + // If a var is a base spec we won't need to import it for (CodegenProperty var : model.vars) { - if (baseSpecs.contains(var.complexType)) { - var.vendorExtensions.put(X_BASE_SPEC, true); - } else { - var.vendorExtensions.put(X_BASE_SPEC, false); - } + var.vendorExtensions.put(X_BASE_SPEC, baseSpecs.contains(var.complexType)); // TODO: 5.0 Remove + var.vendorExtensions.put(VENDOR_EXTENSION_X_BASE_SPEC, baseSpecs.contains(var.complexType)); if (var.items != null) { - if (baseSpecs.contains(var.items.complexType)) { - var.items.vendorExtensions.put(X_BASE_SPEC, true); - } else { - var.items.vendorExtensions.put(X_BASE_SPEC, false); - } + var.items.vendorExtensions.put(X_BASE_SPEC, baseSpecs.contains(var.items.complexType)); // TODO: 5.0 Remove + var.items.vendorExtensions.put(VENDOR_EXTENSION_X_BASE_SPEC, baseSpecs.contains(var.items.complexType)); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 6d9ba3c32e34..110a69f8bd12 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -32,6 +32,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.*; public class CppPistacheServerCodegen extends AbstractCppCodegen { @@ -245,6 +246,9 @@ public Map postProcessOperationsWithModels(Map o operations.put("classnameSnakeUpperCase", underscore(classname).toUpperCase(Locale.ROOT)); operations.put("classnameSnakeLowerCase", underscore(classname).toLowerCase(Locale.ROOT)); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + List operationList = (List) operations.get("operation"); for (CodegenOperation op : operationList) { boolean consumeJson = false; @@ -254,7 +258,9 @@ public Map postProcessOperationsWithModels(Map o op.bodyParam.vendorExtensions = new HashMap<>(); } - op.bodyParam.vendorExtensions.put("x-codegen-pistache-isStringOrDate", op.bodyParam.isString || op.bodyParam.isDate); + boolean isStringOrDate = op.bodyParam.isString || op.bodyParam.isDate; + op.bodyParam.vendorExtensions.put("x-codegen-pistache-isStringOrDate", isStringOrDate); // TODO: 5.0 Remove + op.bodyParam.vendorExtensions.put("x-codegen-pistache-is-string-or-date", isStringOrDate); } if (op.consumes != null) { for (Map consume : op.consumes) { @@ -288,8 +294,10 @@ public Map postProcessOperationsWithModels(Map o if (op.vendorExtensions == null) { op.vendorExtensions = new HashMap<>(); } - op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson); - op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported); + op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-pistache-consumes-json", consumeJson); + op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-pistache-is-parsing-supported", isParsingSupported); // Check if any one of the operations needs a model, then at API file level, at least one model has to be included. for(String hdr : op.imports) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java index 292a41fdc3e2..a3747679c4c9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java @@ -11,12 +11,16 @@ import org.openapitools.codegen.CodegenParameter; 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.*; -public class CppQt5AbstractCodegen extends AbstractCppCodegen implements CodegenConfig { +import static org.openapitools.codegen.utils.OnceLogger.once; +public class CppQt5AbstractCodegen extends AbstractCppCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(CppQt5AbstractCodegen.class); protected final String PREFIX = "OAI"; protected String apiVersion = "1.0.0"; protected static final String CPP_NAMESPACE = "cppNamespace"; @@ -314,6 +318,10 @@ public Map postProcessOperationsWithModels(Map o List> imports = (List>) objs.get("imports"); Map codegenModels = new HashMap (); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for(Object moObj : allModels) { CodegenModel mo = ((Map) moObj).get("model"); if(mo.isEnum) { @@ -323,7 +331,8 @@ public Map postProcessOperationsWithModels(Map o for (CodegenOperation operation : operations) { if(operation.returnType != null) { if(codegenModels.containsKey(operation.returnType)){ - operation.vendorExtensions.put("returnsEnum", true); + operation.vendorExtensions.put("returnsEnum", true); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-returns-enum", true); } } // Check all return parameter baseType if there is a necessity to include, include it if not diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index fa22aef26890..bebbf3f70ce4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -29,6 +29,7 @@ import java.util.*; import java.util.Map.Entry; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.*; public class CppRestbedServerCodegen extends AbstractCppCodegen { @@ -277,6 +278,10 @@ public Map postProcessOperationsWithModels(Map o Map operations = (Map) objs.get("operations"); List operationList = (List) operations.get("operation"); List newOpList = new ArrayList(); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenOperation op : operationList) { String path = op.path; @@ -298,7 +303,9 @@ public Map postProcessOperationsWithModels(Map o } op.path += item + "/"; } - op.vendorExtensions.put("x-codegen-resourceName", resourceNameCamelCase); + op.vendorExtensions.put("x-codegen-resourceName", resourceNameCamelCase); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-resource-name", resourceNameCamelCase); + boolean foundInNewList = false; for (CodegenOperation op1 : newOpList) { if (!foundInNewList) { @@ -310,7 +317,8 @@ public Map postProcessOperationsWithModels(Map o } op.operationIdCamelCase = op1.operationIdCamelCase; currentOtherMethodList.add(op); - op1.vendorExtensions.put("x-codegen-otherMethods", currentOtherMethodList); + op1.vendorExtensions.put("x-codegen-otherMethods", currentOtherMethodList); // TODO: 5.0 Remove + op1.vendorExtensions.put("x-codegen-other-methods", currentOtherMethodList); } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index af85710ef74b..da4b41562b1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -40,6 +40,7 @@ import io.swagger.v3.oas.models.media.Schema; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -261,6 +262,10 @@ public Map postProcessModels(Map objs) { objs = super.postProcessModels(objs); List models = (List) objs.get("models"); ProcessUtils.addIndexToProperties(models, 1); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Object _mo : models) { Map mo = (Map) _mo; Set modelImports = new HashSet<>(); @@ -276,7 +281,9 @@ public Map postProcessModels(Map objs) { } cm.imports = modelImports; - cm.vendorExtensions.put("hasVars", cm.vars.size() > 0); + boolean hasVars = cm.vars.size() > 0; + cm.vendorExtensions.put("hasVars", hasVars); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-has-vars", hasVars); } return objs; } @@ -342,9 +349,16 @@ public Map postProcessOperationsWithModels(Map o } } - op.vendorExtensions.put("isJson", isJson); - op.vendorExtensions.put("isForm", isForm); - op.vendorExtensions.put("isMultipart", isMultipart); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + + op.vendorExtensions.put("isJson", isJson); // TODO: 5.0 Remove + op.vendorExtensions.put("isForm", isForm); // TODO: 5.0 Remove + op.vendorExtensions.put("isMultipart", isMultipart); // TODO: 5.0 Remove + + op.vendorExtensions.put("x-is-json", isJson); + op.vendorExtensions.put("x-is-form", isForm); + op.vendorExtensions.put("x-is-multipart", isMultipart); if (op.getHasFormParams()) { fullImports.add("package:" + pubName + "/api_util.dart"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java index 9cc531c096fe..934354fb2dfe 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java @@ -24,13 +24,17 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.utils.ProcessUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.underscore; public class DartJaguarClientCodegen extends DartClientCodegen { + private static final Logger LOGGER = LoggerFactory.getLogger(DartJaguarClientCodegen.class); private static final String NULLABLE_FIELDS = "nullableFields"; private static final String SERIALIZATION_FORMAT = "serialization"; private static final String IS_FORMAT_JSON = "jsonFormat"; @@ -220,6 +224,10 @@ public Map postProcessModels(Map objs) { objs = super.postProcessModels(objs); List models = (List) objs.get("models"); ProcessUtils.addIndexToProperties(models, 1); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Object _mo : models) { Map mo = (Map) _mo; Set modelImports = new HashSet<>(); @@ -240,7 +248,9 @@ public Map postProcessModels(Map objs) { } cm.imports = modelImports; - cm.vendorExtensions.put("hasVars", cm.vars.size() > 0); + boolean hasVars = cm.vars.size() > 0; + cm.vendorExtensions.put("hasVars", hasVars); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-has-vars", hasVars); } return objs; } @@ -248,12 +258,15 @@ public Map postProcessModels(Map objs) { @Override public Map postProcessOperationsWithModels(Map objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + Map operations = (Map) objs.get("operations"); List operationList = (List) operations.get("operation"); Set modelImports = new HashSet<>(); Set fullImports = new HashSet<>(); - for (CodegenOperation op : operationList) { op.httpMethod = StringUtils.capitalize(op.httpMethod.toLowerCase(Locale.ROOT)); boolean isJson = true; //default to JSON @@ -292,10 +305,16 @@ public Map postProcessOperationsWithModels(Map o } } - op.vendorExtensions.put("isJson", isJson); - op.vendorExtensions.put("isProto", isProto); - op.vendorExtensions.put("isForm", isForm); - op.vendorExtensions.put("isMultipart", isMultipart); + op.vendorExtensions.put("isForm", isForm); // TODO: 5.0 Remove + op.vendorExtensions.put("isJson", isJson); // TODO: 5.0 Remove + op.vendorExtensions.put("isProto", isProto); // TODO: 5.0 Remove + op.vendorExtensions.put("isMultipart", isMultipart); // TODO: 5.0 Remove + + op.vendorExtensions.put("x-is-form", isForm); + op.vendorExtensions.put("x-is-json", isJson); + op.vendorExtensions.put("x-is-proto", isProto); + op.vendorExtensions.put("x-is-multipart", isMultipart); + Set imports = new HashSet<>(); for (String item : op.imports) { 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 181a38f1cb57..903c92de2f09 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 @@ -35,6 +35,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { @@ -47,10 +48,14 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { private static final String ELM_PREFIX_CUSTOM_TYPE_VARIANTS = "elmPrefixCustomTypeVariants"; private static final String ELM_ENABLE_CUSTOM_BASE_PATHS = "elmEnableCustomBasePaths"; private static final String ELM_ENABLE_HTTP_REQUEST_TRACKERS = "elmEnableHttpRequestTrackers"; - private static final String ENCODER = "elmEncoder"; - private static final String DECODER = "elmDecoder"; - private static final String DISCRIMINATOR_NAME = "discriminatorName"; - private static final String CUSTOM_TYPE = "elmCustomType"; + private static final String ENCODER = "elmEncoder"; // TODO: 5.0 Remove + private static final String VENDOR_EXTENSION_ENCODER = "x-elm-encoder"; + private static final String DECODER = "elmDecoder"; // TODO: 5.0 Remove + private static final String VENDOR_EXTENSION_DECODER = "x-elm-decoder"; + private static final String DISCRIMINATOR_NAME = "discriminatorName"; // TODO: 5.0 Remove + private static final String VENDOR_EXTENSION_DISCRIMINATOR_NAME = "x-discriminator-name"; + private static final String CUSTOM_TYPE = "elmCustomType"; // TODO: 5.0 Remove + private static final String VENDOR_EXTENSION_CUSTOM_TYPE = "x-elm-custom-type"; protected String packageName = "openapi"; protected String packageVersion = "1.0.0"; @@ -341,6 +346,10 @@ public CodegenModel fromModel(String name, Schema schema) { @SuppressWarnings({"static-method", "unchecked"}) public Map postProcessAllModels(Map objs) { + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + // Index all CodegenModels by model name. Map allModels = new HashMap<>(); for (Map.Entry entry : objs.entrySet()) { @@ -378,7 +387,8 @@ public int compare(CodegenModel cm1, CodegenModel cm2) { CodegenModel cm = (CodegenModel) mo.get("model"); if (cm.isEnum) { addEncoderAndDecoder(cm.vendorExtensions, cm.classname, DataTypeExposure.EXPOSED); - cm.vendorExtensions.put(CUSTOM_TYPE, cm.classname); + cm.vendorExtensions.put(CUSTOM_TYPE, cm.classname); // TODO: 5.0 Remove + cm.vendorExtensions.put(VENDOR_EXTENSION_CUSTOM_TYPE, cm.classname); } else if (cm.isAlias) { addEncoderAndDecoder(cm.vendorExtensions, cm.dataType, DataTypeExposure.EXPOSED); } @@ -416,7 +426,8 @@ public int compare(CodegenModel cm1, CodegenModel cm2) { child.allVars.clear(); child.allVars.addAll(allVars); - child.vendorExtensions.put(DISCRIMINATOR_NAME, propertyName); + child.vendorExtensions.put(DISCRIMINATOR_NAME, propertyName); // TODO: 5.0 Remove + child.vendorExtensions.put(VENDOR_EXTENSION_DISCRIMINATOR_NAME, propertyName); } } inner.put("elmImports", elmImports); @@ -464,6 +475,9 @@ public Map postProcessOperationsWithModels(Map o Map objs = (Map) operations.get("operations"); List ops = (List) objs.get("operation"); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + final Set dependencies = new HashSet<>(); for (CodegenOperation op : ops) { @@ -484,7 +498,8 @@ public Map postProcessOperationsWithModels(Map o } }) .collect(Collectors.toList()); - op.vendorExtensions.put("pathParams", pathParams); + op.vendorExtensions.put("pathParams", pathParams); // TODO: 5.0 Remove + op.vendorExtensions.put("x-path-params", pathParams); } for (CodegenParameter param : op.allParams) { @@ -677,9 +692,13 @@ public String getTypeDeclaration(Schema p) { public CodegenProperty fromProperty(String name, Schema p) { final CodegenProperty property = super.fromProperty(name, p); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (property.isEnum) { addEncoderAndDecoder(property.vendorExtensions, property.baseName, DataTypeExposure.INTERNAL); - property.vendorExtensions.put(CUSTOM_TYPE, property.datatypeWithEnum); + property.vendorExtensions.put(CUSTOM_TYPE, property.datatypeWithEnum); // TODO: 5.0 Remove + property.vendorExtensions.put(VENDOR_EXTENSION_CUSTOM_TYPE, property.datatypeWithEnum); } else { final boolean isPrimitiveType = property.isMapContainer ? isPrimitiveDataType(property.dataType) : property.isPrimitiveType; addEncoderAndDecoder(property.vendorExtensions, property.dataType, isPrimitiveType ? DataTypeExposure.PRIMITIVE : DataTypeExposure.EXTERNAL); @@ -758,12 +777,12 @@ private void addEncoderAndDecoder(final Map vendorExtensions, fi encodeName = ""; decoderName = ""; } - if (!vendorExtensions.containsKey(ENCODER)) { - vendorExtensions.put(ENCODER, encodeName); - } - if (!vendorExtensions.containsKey(DECODER)) { - vendorExtensions.put(DECODER, decoderName); - } + + vendorExtensions.putIfAbsent(ENCODER, encodeName); // TODO: 5.0 Remove + vendorExtensions.putIfAbsent(VENDOR_EXTENSION_ENCODER, encodeName); + + vendorExtensions.putIfAbsent(DECODER, decoderName); // TODO: 5.0 Remove + vendorExtensions.putIfAbsent(VENDOR_EXTENSION_DECODER, decoderName); } private enum DataTypeExposure { 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 e22199b4307a..ebdc25140054 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 @@ -38,6 +38,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -87,40 +88,74 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC static final String MIME_ANY = "MimeAny"; // vendor extensions - static final String X_ALL_UNIQUE_PARAMS = "x-allUniqueParams"; - static final String X_ALL_IMPORT_MAPPINGS = "x-allImportMappings"; - static final String X_ALL_UNIQUE_IMPORT_PATHS = "x-allUniqueImportPaths"; - static final String X_COLLECTION_FORMAT = "x-collectionFormat"; - static final String X_HADDOCK_PATH = "x-haddockPath"; - static final String X_HAS_BODY_OR_FORM_PARAM = "x-hasBodyOrFormParam"; - static final String X_HAS_ENUM_SECTION = "x-hasEnumSection"; - static final String X_HAS_IMPORT_MAPPINGS = "x-hasImportMappings"; - static final String X_HAS_MIME_FORM_URL_ENCODED = "x-hasMimeFormUrlEncoded"; - static final String X_HAS_NEW_TAG = "x-hasNewTag"; - static final String X_HAS_OPTIONAL_PARAMS = "x-hasOptionalParams"; - static final String X_HAS_UNKNOWN_MIME_TYPES = "x-hasUnknownMimeTypes"; - static final String X_HAS_UNKNOWN_RETURN = "x-hasUnknownReturn"; - static final String X_INLINE_CONTENT_TYPE = "x-inlineContentType"; - static final String X_INLINE_ACCEPT = "x-inlineAccept"; - static final String X_IS_BODY_OR_FORM_PARAM = "x-isBodyOrFormParam"; - static final String X_IS_BODY_PARAM = "x-isBodyParam"; - static final String X_IS_MAYBE_VALUE = "x-isMaybeValue"; - static final String X_MEDIA_DATA_TYPE = "x-mediaDataType"; - static final String X_DATA_TYPE = "x-dataType"; - static final String X_ENUM_VALUES = "x-enumValues"; - static final String X_MEDIA_IS_JSON = "x-mediaIsJson"; - static final String X_MEDIA_IS_WILDCARD = "x-mediaIsWildcard"; - static final String X_MIME_TYPES = "x-mimeTypes"; - static final String X_OPERATION_TYPE = "x-operationType"; - static final String X_PARAM_NAME_TYPE = "x-paramNameType"; - static final String X_PATH = "x-path"; - static final String X_RETURN_TYPE = "x-returnType"; - static final String X_STRICT_FIELDS = "x-strictFields"; - static final String X_UNKNOWN_MIME_TYPES = "x-unknownMimeTypes"; - static final String X_USE_KATIP = "x-useKatip"; - static final String X_ALLOW_NONUNIQUE_OPERATION_IDS = "x-allowNonUniqueOperationIds"; + static final String X_ALL_UNIQUE_PARAMS = "x-allUniqueParams"; // TODO: 5.0 Remove + static final String X_ALL_IMPORT_MAPPINGS = "x-allImportMappings"; // TODO: 5.0 Remove + static final String X_ALL_UNIQUE_IMPORT_PATHS = "x-allUniqueImportPaths"; // TODO: 5.0 Remove + static final String X_COLLECTION_FORMAT = "x-collectionFormat"; // TODO: 5.0 Remove + static final String X_HADDOCK_PATH = "x-haddockPath"; // TODO: 5.0 Remove + static final String X_HAS_BODY_OR_FORM_PARAM = "x-hasBodyOrFormParam"; // TODO: 5.0 Remove + static final String X_HAS_ENUM_SECTION = "x-hasEnumSection"; // TODO: 5.0 Remove + static final String X_HAS_IMPORT_MAPPINGS = "x-hasImportMappings"; // TODO: 5.0 Remove + static final String X_HAS_MIME_FORM_URL_ENCODED = "x-hasMimeFormUrlEncoded"; // TODO: 5.0 Remove + static final String X_HAS_NEW_TAG = "x-hasNewTag"; // TODO: 5.0 Remove + static final String X_HAS_OPTIONAL_PARAMS = "x-hasOptionalParams"; // TODO: 5.0 Remove + static final String X_HAS_UNKNOWN_MIME_TYPES = "x-hasUnknownMimeTypes"; // TODO: 5.0 Remove + static final String X_HAS_UNKNOWN_RETURN = "x-hasUnknownReturn"; // TODO: 5.0 Remove + static final String X_INLINE_CONTENT_TYPE = "x-inlineContentType"; // TODO: 5.0 Remove + static final String X_INLINE_ACCEPT = "x-inlineAccept"; // TODO: 5.0 Remove + static final String X_IS_BODY_OR_FORM_PARAM = "x-isBodyOrFormParam"; // TODO: 5.0 Remove + static final String X_IS_BODY_PARAM = "x-isBodyParam"; // TODO: 5.0 Remove + static final String X_IS_MAYBE_VALUE = "x-isMaybeValue"; // TODO: 5.0 Remove + static final String X_MEDIA_DATA_TYPE = "x-mediaDataType"; // TODO: 5.0 Remove + static final String X_DATA_TYPE = "x-dataType"; // TODO: 5.0 Remove + static final String X_ENUM_VALUES = "x-enumValues"; // TODO: 5.0 Remove + static final String X_MEDIA_IS_JSON = "x-mediaIsJson"; // TODO: 5.0 Remove + static final String X_MEDIA_IS_WILDCARD = "x-mediaIsWildcard"; // TODO: 5.0 Remove + static final String X_MIME_TYPES = "x-mimeTypes"; // TODO: 5.0 Remove + static final String X_OPERATION_TYPE = "x-operationType"; // TODO: 5.0 Remove + static final String X_PARAM_NAME_TYPE = "x-paramNameType"; // TODO: 5.0 Remove + static final String X_RETURN_TYPE = "x-returnType"; // TODO: 5.0 Remove + static final String X_STRICT_FIELDS = "x-strictFields"; // TODO: 5.0 Remove + static final String X_UNKNOWN_MIME_TYPES = "x-unknownMimeTypes"; // TODO: 5.0 Remove + static final String X_USE_KATIP = "x-useKatip"; // TODO: 5.0 Remove + static final String X_ALLOW_NONUNIQUE_OPERATION_IDS = "x-allowNonUniqueOperationIds"; // TODO: 5.0 Remove + + static final String VENDOR_EXTENSION_X_ALL_UNIQUE_PARAMS = "x-all-unique-params"; + static final String VENDOR_EXTENSION_X_ALL_IMPORT_MAPPINGS = "x-all-import-mappings"; + static final String VENDOR_EXTENSION_X_ALL_UNIQUE_IMPORT_PATHS = "x-all-unique-import-paths"; + static final String VENDOR_EXTENSION_X_COLLECTION_FORMAT = "x-collection-format"; + static final String VENDOR_EXTENSION_X_HADDOCK_PATH = "x-haddock-path"; + static final String VENDOR_EXTENSION_X_HAS_BODY_OR_FORM_PARAM = "x-has-body-or-form-param"; + static final String VENDOR_EXTENSION_X_HAS_ENUM_SECTION = "x-has-enum-section"; + static final String VENDOR_EXTENSION_X_HAS_IMPORT_MAPPINGS = "x-has-import-mappings"; + static final String VENDOR_EXTENSION_X_HAS_MIME_FORM_URL_ENCODED = "x-has-mime-form-url-encoded"; + static final String VENDOR_EXTENSION_X_HAS_NEW_TAG = "x-has-new-tag"; + static final String VENDOR_EXTENSION_X_HAS_OPTIONAL_PARAMS = "x-has-optional-params"; + static final String VENDOR_EXTENSION_X_HAS_UNKNOWN_MIME_TYPES = "x-has-unknown-mime-types"; + static final String VENDOR_EXTENSION_X_HAS_UNKNOWN_RETURN = "x-has-unknown-return"; + static final String VENDOR_EXTENSION_X_INLINE_CONTENT_TYPE = "x-inline-content-type"; + static final String VENDOR_EXTENSION_X_INLINE_ACCEPT = "x-inline-accept"; + static final String VENDOR_EXTENSION_X_IS_BODY_OR_FORM_PARAM = "x-is-body-or-form-param"; + static final String VENDOR_EXTENSION_X_IS_BODY_PARAM = "x-is-body-param"; + static final String VENDOR_EXTENSION_X_IS_MAYBE_VALUE = "x-is-maybe-value"; + static final String VENDOR_EXTENSION_X_MEDIA_DATA_TYPE = "x-media-data-type"; + static final String VENDOR_EXTENSION_X_DATA_TYPE = "x-data-type"; + static final String VENDOR_EXTENSION_X_ENUM_VALUES = "x-enum-values"; + static final String VENDOR_EXTENSION_X_MEDIA_IS_JSON = "x-media-is-json"; + static final String VENDOR_EXTENSION_X_MEDIA_IS_WILDCARD = "x-media-is-wildcard"; + static final String VENDOR_EXTENSION_X_MIME_TYPES = "x-mime-types"; + static final String VENDOR_EXTENSION_X_OPERATION_TYPE = "x-operation-type"; + static final String VENDOR_EXTENSION_X_PARAM_NAME_TYPE = "x-param-name-type"; + static final String VENDOR_EXTENSION_X_RETURN_TYPE = "x-return-type"; + static final String VENDOR_EXTENSION_X_STRICT_FIELDS = "x-strict-fields"; + static final String VENDOR_EXTENSION_X_UNKNOWN_MIME_TYPES = "x-unknown-mime-types"; + static final String VENDOR_EXTENSION_X_USE_KATIP = "x-use-katip"; + static final String VENDOR_EXTENSION_X_ALLOW_NONUNIQUE_OPERATION_IDS = "x-allow-non-unique-operation-ids"; + + // note; newtype is a single lowercase word in Haskell (not separated by hyphen) static final String X_NEWTYPE = "x-newtype"; - static final String X_ENUM = "x-enum"; + static final String VENDOR_EXTENSION_X_ENUM = "x-enum"; + static final String VENDOR_EXTENSION_X_PATH = "x-path"; protected ArrayList> unknownMimeTypes = new ArrayList<>(); protected Map> uniqueParamNameTypes = new HashMap<>(); @@ -664,6 +699,9 @@ public String toInstantiationType(Schema p) { @Override public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation op, Map> operations) { + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + List opList = operations.get(tag); if (opList == null || opList.isEmpty()) { opList = new ArrayList(); @@ -700,25 +738,33 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera op.vendorExtensions = new LinkedHashMap(); String operationType = toTypeName("Op", op.operationId); - op.vendorExtensions.put(X_OPERATION_TYPE, operationType); + op.vendorExtensions.put(X_OPERATION_TYPE, operationType); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_OPERATION_TYPE, operationType); typeNames.add(operationType); - op.vendorExtensions.put(X_HADDOCK_PATH, String.format(Locale.ROOT, "%s %s", op.httpMethod, op.path.replace("/", "\\/"))); - op.vendorExtensions.put(X_HAS_BODY_OR_FORM_PARAM, op.getHasBodyParam() || op.getHasFormParams()); + op.vendorExtensions.put(X_HADDOCK_PATH, String.format(Locale.ROOT, "%s %s", op.httpMethod, op.path.replace("/", "\\/"))); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_HADDOCK_PATH, String.format(Locale.ROOT, "%s %s", op.httpMethod, op.path.replace("/", "\\/"))); + op.vendorExtensions.put(X_HAS_BODY_OR_FORM_PARAM, op.getHasBodyParam() || op.getHasFormParams()); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_HAS_BODY_OR_FORM_PARAM, op.getHasBodyParam() || op.getHasFormParams()); for (CodegenParameter param : op.allParams) { param.vendorExtensions = new LinkedHashMap(); // prevent aliasing/sharing - param.vendorExtensions.put(X_OPERATION_TYPE, operationType); - param.vendorExtensions.put(X_IS_BODY_OR_FORM_PARAM, param.isBodyParam || param.isFormParam); + param.vendorExtensions.put(X_OPERATION_TYPE, operationType); // TODO: 5.0 Remove + param.vendorExtensions.put(VENDOR_EXTENSION_X_OPERATION_TYPE, operationType); + param.vendorExtensions.put(X_IS_BODY_OR_FORM_PARAM, param.isBodyParam || param.isFormParam); // TODO: 5.0 Remove + param.vendorExtensions.put(VENDOR_EXTENSION_X_IS_BODY_OR_FORM_PARAM, param.isBodyParam || param.isFormParam); if (!StringUtils.isBlank(param.collectionFormat)) { - param.vendorExtensions.put(X_COLLECTION_FORMAT, mapCollectionFormat(param.collectionFormat)); + param.vendorExtensions.put(X_COLLECTION_FORMAT, mapCollectionFormat(param.collectionFormat)); // TODO: 5.0 Remove + param.vendorExtensions.put(VENDOR_EXTENSION_X_COLLECTION_FORMAT, mapCollectionFormat(param.collectionFormat)); } else if (!param.isBodyParam && (param.isListContainer || param.dataType.startsWith("["))) { // param.isListContainer is sometimes false for list types // defaulting due to https://github.com/wing328/openapi-generator/issues/72 param.collectionFormat = "csv"; - param.vendorExtensions.put(X_COLLECTION_FORMAT, mapCollectionFormat(param.collectionFormat)); + param.vendorExtensions.put(X_COLLECTION_FORMAT, mapCollectionFormat(param.collectionFormat)); // TODO: 5.0 Remove + param.vendorExtensions.put(VENDOR_EXTENSION_X_COLLECTION_FORMAT, mapCollectionFormat(param.collectionFormat)); } if (!param.required) { - op.vendorExtensions.put(X_HAS_OPTIONAL_PARAMS, true); + op.vendorExtensions.put(X_HAS_OPTIONAL_PARAMS, true); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_HAS_OPTIONAL_PARAMS, true); } if (typeMapping.containsKey(param.dataType) @@ -728,7 +774,8 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera String dataType = genEnums && param.isEnum ? param.datatypeWithEnum : param.dataType; String paramNameType = toDedupedModelName(toTypeName("Param", param.paramName), dataType, !param.isEnum); - param.vendorExtensions.put(X_PARAM_NAME_TYPE, paramNameType); + param.vendorExtensions.put(X_PARAM_NAME_TYPE, paramNameType); // TODO: 5.0 Remove + param.vendorExtensions.put(VENDOR_EXTENSION_X_PARAM_NAME_TYPE, paramNameType); HashMap props = new HashMap<>(); props.put(X_IS_BODY_PARAM, param.isBodyParam); @@ -791,10 +838,14 @@ public int compare(Map o1, Map o2) { public Map postProcessOperationsWithModels(Map objs, List allModels) { Map ret = super.postProcessOperationsWithModels(objs, allModels); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + HashMap pathOps = (HashMap) ret.get("operations"); ArrayList ops = (ArrayList) pathOps.get("operation"); if (ops.size() > 0) { - ops.get(0).vendorExtensions.put(X_HAS_NEW_TAG, true); + ops.get(0).vendorExtensions.put(X_HAS_NEW_TAG, true); // TODO: 5.0 Remove + ops.get(0).vendorExtensions.put(VENDOR_EXTENSION_X_HAS_NEW_TAG, true); } updateGlobalAdditionalProps(); @@ -804,7 +855,10 @@ public Map postProcessOperationsWithModels(Map o CodegenModel m = (CodegenModel) h.get("model"); if (modelMimeTypes.containsKey(m.classname)) { Set mimeTypes = modelMimeTypes.get(m.classname); - m.vendorExtensions.put(X_MIME_TYPES, mimeTypes); + + m.vendorExtensions.put(X_MIME_TYPES, mimeTypes); // TODO: 5.0 Remove + m.vendorExtensions.put(VENDOR_EXTENSION_X_MIME_TYPES, mimeTypes); + if ((boolean) additionalProperties.get(PROP_GENERATE_FORM_URLENCODED_INSTANCES) && mimeTypes.contains("MimeFormUrlEncoded")) { Boolean hasMimeFormUrlEncoded = true; for (CodegenProperty v : m.vars) { @@ -813,7 +867,8 @@ public Map postProcessOperationsWithModels(Map o } } if (hasMimeFormUrlEncoded) { - m.vendorExtensions.put(X_HAS_MIME_FORM_URL_ENCODED, true); + m.vendorExtensions.put(X_HAS_MIME_FORM_URL_ENCODED, true); // TODO: 5.0 Remove + m.vendorExtensions.put(VENDOR_EXTENSION_X_HAS_MIME_FORM_URL_ENCODED, true); } } } @@ -874,9 +929,11 @@ private void processReturnType(CodegenOperation op) { if (returnType == null || returnType.equals("null")) { if (op.hasProduces) { returnType = "res"; - op.vendorExtensions.put(X_HAS_UNKNOWN_RETURN, true); + op.vendorExtensions.put(X_HAS_UNKNOWN_RETURN, true); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_HAS_UNKNOWN_RETURN, true); } else { returnType = "NoContent"; + // TODO: 5.0 Remove vendor extension usage which is not lower-kebab cased. if (!op.vendorExtensions.containsKey(X_INLINE_ACCEPT)) { SetNoContent(op, X_INLINE_ACCEPT); } @@ -885,7 +942,8 @@ private void processReturnType(CodegenOperation op) { if (returnType.contains(" ")) { returnType = "(" + returnType + ")"; } - op.vendorExtensions.put(X_RETURN_TYPE, returnType); + op.vendorExtensions.put(X_RETURN_TYPE, returnType); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_RETURN_TYPE, returnType); } private void processProducesConsumes(CodegenOperation op) { @@ -928,14 +986,20 @@ private void processProducesConsumes(CodegenOperation op) { private void processInlineConsumesContentType(CodegenOperation op, Map m) { if (op.vendorExtensions.containsKey(X_INLINE_CONTENT_TYPE)) return; + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if ((boolean) additionalProperties.get(PROP_INLINE_MIME_TYPES) && op.consumes.size() == 1 && !MIME_ANY.equals(op.consumes.get(0).get(X_MEDIA_DATA_TYPE)) && !MIME_NO_CONTENT.equals(op.consumes.get(0).get(X_MEDIA_DATA_TYPE))) { - op.vendorExtensions.put(X_INLINE_CONTENT_TYPE, m); + op.vendorExtensions.put(X_INLINE_CONTENT_TYPE, m); // TODO: 5.0 Remove + op.vendorExtensions.put(VENDOR_EXTENSION_X_INLINE_CONTENT_TYPE, m); for (CodegenParameter param : op.allParams) { if (param.isBodyParam && param.required) { - param.vendorExtensions.put(X_INLINE_CONTENT_TYPE, m); + param.vendorExtensions.put(X_INLINE_CONTENT_TYPE, m); // TODO: 5.0 Remove + param.vendorExtensions.put(VENDOR_EXTENSION_X_INLINE_CONTENT_TYPE, m); } } } @@ -946,7 +1010,12 @@ private void processInlineProducesContentType(CodegenOperation op, Map lastParam = this.uniqueParamNameTypes.get(paramNameType); if (lastParam != null) { - String comparisonKey = lastParam.containsKey(X_ENUM) ? X_ENUM_VALUES : X_DATA_TYPE; + String comparisonKey = lastParam.containsKey(VENDOR_EXTENSION_X_ENUM) ? X_ENUM_VALUES : X_DATA_TYPE; String lastParamDataType = (String) lastParam.get(comparisonKey); if (lastParamDataType != null && lastParamDataType.equals(dataType)) { return true; @@ -1013,7 +1082,7 @@ private void addEnumToUniques(String paramNameType, String datatype, String enum props.put("description", description); } props.put(X_ENUM_VALUES, enumValues); - addToUniques(X_ENUM, paramNameType, datatype, props); + addToUniques(VENDOR_EXTENSION_X_ENUM, paramNameType, datatype, props); additionalProperties.put(X_HAS_ENUM_SECTION, true); } @@ -1033,7 +1102,7 @@ private void processPathExpr(CodegenOperation op) { xPath = xPath.replaceAll("^\\[,", "["); xPath = xPath.replaceAll(",\\]$", "]"); } - op.vendorExtensions.put(X_PATH, xPath); + op.vendorExtensions.put(VENDOR_EXTENSION_X_PATH, xPath); } @@ -1259,6 +1328,10 @@ public String toDefaultValue(Schema p) { @Override public Map postProcessModels(Map objs) { List models = (List) objs.get("models"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Object _mo : models) { Map mo = (Map) _mo; CodegenModel cm = (CodegenModel) mo.get("model"); @@ -1268,18 +1341,22 @@ public Map postProcessModels(Map objs) { if (dataType == null && cm.isArrayModel) { // isAlias + arrayModelType missing "datatype" dataType = "[" + cm.arrayModelType + "]"; } - cm.vendorExtensions.put(X_DATA_TYPE, dataType); + cm.vendorExtensions.put(X_DATA_TYPE, dataType); // TODO: 5.0 Remove + cm.vendorExtensions.put(VENDOR_EXTENSION_X_DATA_TYPE, dataType); if (dataType.equals("Maybe A.Value")) { - cm.vendorExtensions.put(X_IS_MAYBE_VALUE, true); + cm.vendorExtensions.put(X_IS_MAYBE_VALUE, true); // TODO: 5.0 Remove + cm.vendorExtensions.put(VENDOR_EXTENSION_X_IS_MAYBE_VALUE, true); } } for (CodegenProperty var : cm.vars) { String datatype = genEnums && !StringUtils.isBlank(var.datatypeWithEnum) ? var.datatypeWithEnum : var.dataType; - var.vendorExtensions.put(X_DATA_TYPE, datatype); + var.vendorExtensions.put(X_DATA_TYPE, datatype); // TODO: 5.0 Remove + var.vendorExtensions.put(VENDOR_EXTENSION_X_DATA_TYPE, datatype); if (!var.required && datatype.equals("A.Value") || var.required && datatype.equals("Maybe A.Value")) { - var.vendorExtensions.put(X_IS_MAYBE_VALUE, true); + var.vendorExtensions.put(X_IS_MAYBE_VALUE, true); // TODO: 5.0 Remove + var.vendorExtensions.put(VENDOR_EXTENSION_X_IS_MAYBE_VALUE, true); } } } 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 2701f3d2aa8c..14621f597610 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 @@ -34,6 +34,7 @@ import java.util.*; import java.util.regex.Pattern; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public class HaskellServantCodegen extends DefaultCodegen implements CodegenConfig { @@ -506,6 +507,9 @@ private List pathToClientType(String path, List pathPa public CodegenOperation fromOperation(String resourcePath, String httpMethod, Operation operation, List servers) { CodegenOperation op = super.fromOperation(resourcePath, httpMethod, operation, servers); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + List path = pathToServantRoute(op.path, op.pathParams); List type = pathToClientType(op.path, op.pathParams); @@ -558,7 +562,8 @@ public CodegenOperation fromOperation(String resourcePath, String httpMethod, Op // store form parameter name in the vendor extensions for (CodegenParameter param : op.formParams) { - param.vendorExtensions.put("x-formParamName", camelize(param.baseName)); + param.vendorExtensions.put("x-formParamName", camelize(param.baseName)); // TODO: 5.0 Remove + param.vendorExtensions.put("x-form-param-name", camelize(param.baseName)); } // Add the HTTP method and return type @@ -572,11 +577,15 @@ public CodegenOperation fromOperation(String resourcePath, String httpMethod, Op path.add("Verb '" + op.httpMethod.toUpperCase(Locale.ROOT) + " 200 '[JSON] " + returnType); type.add("m " + returnType); - op.vendorExtensions.put("x-routeType", joinStrings(" :> ", path)); - op.vendorExtensions.put("x-clientType", joinStrings(" -> ", type)); - op.vendorExtensions.put("x-formName", "Form" + camelize(op.operationId)); + op.vendorExtensions.put("x-routeType", joinStrings(" :> ", path)); // TODO: 5.0 Remove + op.vendorExtensions.put("x-route-type", joinStrings(" :> ", path)); + op.vendorExtensions.put("x-clientType", joinStrings(" -> ", type)); // TODO: 5.0 Remove + op.vendorExtensions.put("x-client-type", joinStrings(" -> ", type)); + op.vendorExtensions.put("x-formName", "Form" + camelize(op.operationId)); // TODO: 5.0 Remove + op.vendorExtensions.put("x-form-name", "Form" + camelize(op.operationId)); for (CodegenParameter param : op.formParams) { - param.vendorExtensions.put("x-formPrefix", camelize(op.operationId, true)); + param.vendorExtensions.put("x-formPrefix", camelize(op.operationId, true)); // TODO: 5.0 Remove + param.vendorExtensions.put("x-form-prefix", camelize(op.operationId, true)); } return op; } @@ -633,6 +642,9 @@ private String fixModelChars(String string) { public CodegenModel fromModel(String name, Schema mod) { CodegenModel model = super.fromModel(name, mod); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + setGenerateToSchema(model); // Clean up the class name to remove invalid characters @@ -651,7 +663,9 @@ public CodegenModel fromModel(String name, Schema mod) { String dataOrNewtype = "data"; if (!"object".equals(model.dataType) && typeMapping.containsKey(model.dataType)) { String newtype = typeMapping.get(model.dataType); - model.vendorExtensions.put("x-customNewtype", newtype); + model.vendorExtensions.put("x-customNewtype", newtype); // TODO: 5.0 Remove + // note; newtype is a single lowercase word in Haskell (not separated by hyphen) + model.vendorExtensions.put("x-custom-newtype", newtype); } // Provide the prefix as a vendor extension, so that it can be used in the ToJSON and FromJSON instances. 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 571717ceb27d..ff0d6605c1c2 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 @@ -46,6 +46,7 @@ import static com.google.common.base.CaseFormat.LOWER_CAMEL; import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE; import static java.util.Collections.sort; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public class JavaClientCodegen extends AbstractJavaCodegen @@ -855,13 +856,18 @@ public void addOneOfNameExtension(Schema s, String name) { public void addOneOfInterfaceModel(ComposedSchema cs, String type) { CodegenModel cm = new CodegenModel(); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + + for (Schema o : cs.getOneOf()) { // TODO: inline objects cm.oneOf.add(toModelName(ModelUtils.getSimpleRef(o.get$ref()))); } cm.name = type; cm.classname = type; - cm.vendorExtensions.put("isOneOfInterface", true); + cm.vendorExtensions.put("isOneOfInterface", true); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-is-one-of-interface", true); cm.discriminator = createDiscriminator("", (Schema) cs); cm.interfaceModels = new ArrayList(); @@ -1011,6 +1017,9 @@ public void addToImplementor(CodegenModel implcm, List> impl public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (this.useOneOfInterfaces) { // First, add newly created oneOf interfaces for (CodegenModel cm : addOneOfInterfaces) { @@ -1052,7 +1061,8 @@ public Map postProcessAllModels(Map objs) { Map mo = (Map) _mo; CodegenModel cm = (CodegenModel) mo.get("model"); if (cm.oneOf.size() > 0) { - cm.vendorExtensions.put("isOneOfInterface", true); + cm.vendorExtensions.put("isOneOfInterface", true); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-is-one-of-interface", true); // if this is oneOf interface, make sure we include the necessary jackson imports for it for (String s : Arrays.asList("JsonTypeInfo", "JsonSubTypes")) { Map i = new HashMap() {{ 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 ffe6f8660fc1..90ce97233e23 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 @@ -21,6 +21,8 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.util.List; @@ -29,10 +31,11 @@ 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.camelize; public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements BeanValidationFeatures { - + private static final Logger LOGGER = LoggerFactory.getLogger(JavaPlayFrameworkCodegen.class); public static final String TITLE = "title"; public static final String CONFIG_PACKAGE = "configPackage"; public static final String BASE_PACKAGE = "basePackage"; @@ -289,6 +292,10 @@ public void setUseSwaggerUI(boolean useSwaggerUI) { @Override public Map postProcessOperationsWithModels(Map objs, List allModels) { Map operations = (Map) objs.get("operations"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (operations != null) { List ops = (List) operations.get("operation"); for (CodegenOperation operation : ops) { @@ -315,10 +322,12 @@ public Map postProcessOperationsWithModels(Map o if (operation.returnType != null) { if (operation.returnType.equals("Boolean")) { - operation.vendorExtensions.put("missingReturnInfoIfNeeded", "true"); + operation.vendorExtensions.put("missingReturnInfoIfNeeded", "true"); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-missing-return-info-if-needed", "true"); } if (operation.returnType.equals("BigDecimal")) { - operation.vendorExtensions.put("missingReturnInfoIfNeeded", "1.0"); + operation.vendorExtensions.put("missingReturnInfoIfNeeded", "1.0"); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-missing-return-info-if-needed", "1.0"); } if (operation.returnType.startsWith("List")) { String rt = operation.returnType; 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 1bb9c9f2b9ee..535d6f2beb7b 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 @@ -33,6 +33,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.*; public class JavascriptClientCodegen extends DefaultCodegen implements CodegenConfig { @@ -860,6 +861,10 @@ public String toOperationId(String operationId) { @Override public CodegenModel fromModel(String name, Schema model) { + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + Map allDefinitions = ModelUtils.getSchemas(this.openAPI); CodegenModel codegenModel = super.fromModel(name, model); @@ -871,17 +876,24 @@ public CodegenModel fromModel(String name, Schema model) { if (ModelUtils.isArraySchema(model)) { ArraySchema am = (ArraySchema) model; if (codegenModel != null && am.getItems() != null) { - codegenModel.getVendorExtensions().put("x-isArray", true); - codegenModel.getVendorExtensions().put("x-itemType", getSchemaType(am.getItems())); + String itemType = getSchemaType(am.getItems()); + codegenModel.vendorExtensions.put("x-isArray", true); // TODO: 5.0 Remove + codegenModel.vendorExtensions.put("x-is-array", true); + codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove + codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { if (codegenModel != null && ModelUtils.getAdditionalProperties(model) != null) { - codegenModel.getVendorExtensions().put("x-isMap", true); - codegenModel.getVendorExtensions().put("x-itemType", getSchemaType(ModelUtils.getAdditionalProperties(model))); + String itemType = getSchemaType(ModelUtils.getAdditionalProperties(model)); + codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove + codegenModel.vendorExtensions.put("x-is-map", true); + codegenModel.vendorExtensions.put("x-itemType",itemType); // TODO: 5.0 Remove + codegenModel.vendorExtensions.put("x-item-type",itemType); } else { String type = model.getType(); if (codegenModel != null && isPrimitiveType(type)) { - codegenModel.vendorExtensions.put("x-isPrimitive", true); + codegenModel.vendorExtensions.put("x-isPrimitive", true); // TODO: 5.0 Remove + codegenModel.vendorExtensions.put("x-is-primitive", true); } } } @@ -979,6 +991,10 @@ public Map postProcessOperationsWithModels(Map o // Generate and store argument list string of each operation into // vendor-extension: x-codegen-argList. Map operations = (Map) objs.get("operations"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (operations != null) { List ops = (List) operations.get("operation"); for (CodegenOperation operation : ops) { @@ -1004,8 +1020,11 @@ public Map postProcessOperationsWithModels(Map o if (!usePromises) { argList.add("callback"); } - operation.vendorExtensions.put("x-codegen-argList", StringUtils.join(argList, ", ")); - operation.vendorExtensions.put("x-codegen-hasOptionalParams", hasOptionalParams); + String joinedArgList = StringUtils.join(argList, ", "); + operation.vendorExtensions.put("x-codegen-argList", joinedArgList); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-codegen-arg-list", joinedArgList); + operation.vendorExtensions.put("x-codegen-hasOptionalParams", hasOptionalParams); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-codegen-has-optional-params", hasOptionalParams); // Store JSDoc type specification into vendor-extension: x-jsdoc-type. for (CodegenParameter cp : operation.allParams) { @@ -1029,6 +1048,10 @@ public Map postProcessOperationsWithModels(Map o public Map postProcessModels(Map objs) { objs = super.postProcessModelsEnum(objs); List models = (List) objs.get("models"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Object _mo : models) { Map mo = (Map) _mo; CodegenModel cm = (CodegenModel) mo.get("model"); @@ -1079,9 +1102,11 @@ public Map postProcessModels(Map objs) { for (CodegenProperty var : cm.vars) { Optional.ofNullable(lastRequired).ifPresent(_lastRequired -> { if (var == _lastRequired) { - var.vendorExtensions.put("x-codegen-hasMoreRequired", false); + var.vendorExtensions.put("x-codegen-hasMoreRequired", false); // TODO: 5.0 Remove + var.vendorExtensions.put("x-codegen-has-more-required", false); } else if (var.required) { - var.vendorExtensions.put("x-codegen-hasMoreRequired", true); + var.vendorExtensions.put("x-codegen-hasMoreRequired", true); // TODO: 5.0 Remove + var.vendorExtensions.put("x-codegen-has-more-required", true); } }); } 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 12a7e013f004..71a681f0eb67 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 @@ -30,7 +30,8 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(MysqlSchemaCodegen.class); - public static final String CODEGEN_VENDOR_EXTENSION_KEY = "x-mysqlSchema"; + public static final String CODEGEN_VENDOR_EXTENSION_KEY = "x-mysqlSchema"; // TODO: 5.0 Remove + public static final String VENDOR_EXTENSION_MYSQL_SCHEMA = "x-mysql-schema"; public static final String DEFAULT_DATABASE_NAME = "defaultDatabaseName"; public static final String JSON_DATA_TYPE_ENABLED = "jsonDataTypeEnabled"; public static final String IDENTIFIER_NAMING_CONVENTION = "identifierNamingConvention"; @@ -338,7 +339,8 @@ public void processIntegerTypeProperty(CodegenModel model, CodegenProperty prope description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); @@ -425,7 +427,8 @@ public void processDecimalTypeProperty(CodegenModel model, CodegenProperty prope description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); @@ -503,7 +506,8 @@ public void processBooleanTypeProperty(CodegenModel model, CodegenProperty prope description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); columnDefinition.put("colDataType", "TINYINT"); @@ -561,7 +565,8 @@ public void processStringTypeProperty(CodegenModel model, CodegenProperty proper description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); @@ -635,7 +640,8 @@ public void processDateTypeProperty(CodegenModel model, CodegenProperty property description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); columnDefinition.put("colDataType", dataType); @@ -686,7 +692,8 @@ public void processJsonTypeProperty(CodegenModel model, CodegenProperty property description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); columnDefinition.put("colDataType", dataType); @@ -740,7 +747,8 @@ public void processUnknownTypeProperty(CodegenModel model, CodegenProperty prope description = (description == null || description.isEmpty()) ? commentExtra : description + ". " + commentExtra; } - vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); + vendorExtensions.put(CODEGEN_VENDOR_EXTENSION_KEY, mysqlSchema); // TODO: 5.0 Remove + vendorExtensions.put(VENDOR_EXTENSION_MYSQL_SCHEMA, mysqlSchema); mysqlSchema.put("columnDefinition", columnDefinition); columnDefinition.put("colName", colName); columnDefinition.put("colDataType", "TEXT"); 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 4ce0c93a4e56..73635c0fbd77 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 @@ -35,6 +35,7 @@ import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.capitalize; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.escape; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -713,6 +714,10 @@ public Map postProcessOperationsWithModels(Map o Map objectMap = (Map) objs.get("operations"); @SuppressWarnings("unchecked") List operations = (List) objectMap.get("operation"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenOperation operation : operations) { // http method verb conversion, depending on client library (e.g. Hyper: PUT => Put, Reqwest: PUT => put) //if (CO_HTTP.equals(getLibrary())) { @@ -723,7 +728,8 @@ public Map postProcessOperationsWithModels(Map o } if ("Yojson.Safe.t".equals(operation.returnBaseType)) { - operation.vendorExtensions.put("x-returnFreeFormObject", true); + operation.vendorExtensions.put("x-returnFreeFormObject", true); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-return-free-form-object", true); } } 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 bcf153340e02..b35a821bf9b7 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 @@ -29,6 +29,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { @@ -652,12 +653,17 @@ public void setLicense(String license) { @Override public Map postProcessOperationsWithModels(Map objs, List allModels) { Map operations = (Map) objs.get("operations"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (operations != null) { List ops = (List) operations.get("operation"); for (CodegenOperation operation : ops) { if (!operation.allParams.isEmpty()) { String firstParamName = operation.allParams.get(0).paramName; - operation.vendorExtensions.put("firstParamAltName", camelize(firstParamName)); + operation.vendorExtensions.put("firstParamAltName", camelize(firstParamName)); // TODO: 5.0 Remove + operation.vendorExtensions.put("x-first-param-alt-name", camelize(firstParamName)); } } } @@ -667,7 +673,12 @@ public Map postProcessOperationsWithModels(Map o @Override public void postProcessModelProperty(CodegenModel model, CodegenProperty schema) { super.postProcessModelProperty(model, schema); - schema.vendorExtensions.put("x-uppercaseName", camelize(schema.name)); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + + schema.vendorExtensions.put("x-uppercaseName", camelize(schema.name)); // TODO: 5.0 Remove + schema.vendorExtensions.put("x-uppercase-name", camelize(schema.name)); } /** diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index 851fca240ddd..8d98f28e3dfd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -29,6 +29,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements CodegenConfig { @@ -382,6 +383,9 @@ public void processOpts() { public Map postProcessOperationsWithModels(Map objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + Map operations = (Map) objs.get("operations"); operations.put("controllerName", toControllerName((String) operations.get("pathPrefix"))); operations.put("symfonyService", toSymfonyService((String) operations.get("pathPrefix"))); @@ -397,17 +401,21 @@ public Map postProcessOperationsWithModels(Map o // to the templating engine String typeHint = getTypeHint(param.dataType); if (!typeHint.isEmpty()) { - param.vendorExtensions.put("x-parameterType", typeHint); + param.vendorExtensions.put("x-parameterType", typeHint); // TODO: 5.0 Remove + param.vendorExtensions.put("x-parameter-type", typeHint); } if (param.isContainer) { - param.vendorExtensions.put("x-parameterType", getTypeHint(param.dataType + "[]")); + param.vendorExtensions.put("x-parameterType", getTypeHint(param.dataType + "[]")); // TODO: 5.0 Remove + param.vendorExtensions.put("x-parameter-type", getTypeHint(param.dataType + "[]")); } // Create a variable to display the correct data type in comments for interfaces - param.vendorExtensions.put("x-commentType", param.dataType); + param.vendorExtensions.put("x-commentType", param.dataType); // TODO: 5.0 Remove + param.vendorExtensions.put("x-comment-type", param.dataType); if (param.isContainer) { - param.vendorExtensions.put("x-commentType", param.dataType + "[]"); + param.vendorExtensions.put("x-commentType", param.dataType + "[]"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-comment-type", param.dataType + "[]"); } // Quote default values for strings @@ -421,12 +429,15 @@ public Map postProcessOperationsWithModels(Map o // Create a variable to display the correct return type in comments for interfaces if (op.returnType != null) { - op.vendorExtensions.put("x-commentType", op.returnType); + op.vendorExtensions.put("x-commentType", op.returnType); // TODO: 5.0 Remove + op.vendorExtensions.put("x-comment-type", op.returnType); if (op.returnContainer != null && op.returnContainer.equals("array")) { - op.vendorExtensions.put("x-commentType", op.returnType + "[]"); + op.vendorExtensions.put("x-commentType", op.returnType + "[]"); // TODO: 5.0 Remove + op.vendorExtensions.put("x-comment-type", op.returnType + "[]"); } } else { - op.vendorExtensions.put("x-commentType", "void"); + op.vendorExtensions.put("x-commentType", "void"); // TODO: 5.0 Remove + op.vendorExtensions.put("x-comment-type", "void"); } // Add operation's authentication methods to whole interface @@ -448,6 +459,9 @@ public Map postProcessOperationsWithModels(Map o public Map postProcessModels(Map objs) { objs = super.postProcessModels(objs); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + ArrayList modelsArray = (ArrayList) objs.get("models"); Map models = (Map) modelsArray.get(0); CodegenModel model = (CodegenModel) models.get("model"); @@ -459,17 +473,21 @@ public Map postProcessModels(Map objs) { // to the templating engine String typeHint = getTypeHint(var.dataType); if (!typeHint.isEmpty()) { - var.vendorExtensions.put("x-parameterType", typeHint); + var.vendorExtensions.put("x-parameterType", typeHint); // TODO: 5.0 Remove + var.vendorExtensions.put("x-parameter-type", typeHint); } if (var.isContainer) { - var.vendorExtensions.put("x-parameterType", getTypeHint(var.dataType + "[]")); + var.vendorExtensions.put("x-parameterType", getTypeHint(var.dataType + "[]")); // TODO: 5.0 Remove + var.vendorExtensions.put("x-parameter-type", getTypeHint(var.dataType + "[]")); } // Create a variable to display the correct data type in comments for models - var.vendorExtensions.put("x-commentType", var.dataType); + var.vendorExtensions.put("x-commentType", var.dataType); // TODO: 5.0 Remove + var.vendorExtensions.put("x-comment-type", var.dataType); if (var.isContainer) { - var.vendorExtensions.put("x-commentType", var.dataType + "[]"); + var.vendorExtensions.put("x-commentType", var.dataType + "[]"); // TODO: 5.0 Remove + var.vendorExtensions.put("x-comment-type", var.dataType + "[]"); } } } 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 e5f1e88a4e59..dc8969e8b272 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 @@ -31,6 +31,7 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -188,6 +189,10 @@ public Map postProcessModels(Map objs) { public Map postProcessAllModels(Map objs) { // Index all CodegenModels by model name. Map allModels = new HashMap<>(); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Map.Entry entry : objs.entrySet()) { String modelName = toModelName(entry.getKey()); Map inner = (Map) entry.getValue(); @@ -215,8 +220,11 @@ public Map postProcessAllModels(Map objs) { discriminatorVars.add(mas); } // TODO: figure out how to properly have the original property type that didn't go through toVarName - cm.vendorExtensions.put("tagName", cm.discriminator.getPropertyName().replace("_", "")); - cm.vendorExtensions.put("mappedModels", discriminatorVars); + String vendorExtensionTagName = cm.discriminator.getPropertyName().replace("_", ""); + cm.vendorExtensions.put("tagName", vendorExtensionTagName); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-tag-name", vendorExtensionTagName); + cm.vendorExtensions.put("mappedModels", discriminatorVars); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-mapped-models", discriminatorVars); } } } 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 8815ca4e5118..351b872a9979 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 @@ -41,6 +41,7 @@ import java.util.*; import java.util.Map.Entry; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -552,6 +553,9 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation Map definitions = ModelUtils.getSchemas(this.openAPI); CodegenOperation op = super.fromOperation(path, httpMethod, operation, servers); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + String pathFormatString = op.path; for (CodegenParameter param : op.pathParams) { // Replace {baseName} with {paramName} for format string @@ -606,12 +610,23 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation pathSetEntry.put("pathRegEx", pathRegEx + "$"); pathSetMap.put(pathId, pathSetEntry); } - op.vendorExtensions.put("operation_id", underscore(op.operationId)); - op.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase(Locale.ROOT)); - op.vendorExtensions.put("path", op.path.replace("{", ":").replace("}", "")); - op.vendorExtensions.put("PATH_ID", pathId); - op.vendorExtensions.put("hasPathParams", !op.pathParams.isEmpty()); - op.vendorExtensions.put("HttpMethod", Character.toUpperCase(op.httpMethod.charAt(0)) + op.httpMethod.substring(1).toLowerCase(Locale.ROOT)); + String underscoredOperationId = underscore(op.operationId); + op.vendorExtensions.put("operation_id", underscoredOperationId); // TODO: 5.0 Remove + op.vendorExtensions.put("x-operation-id", underscoredOperationId); + op.vendorExtensions.put("uppercase_operation_id", underscoredOperationId.toUpperCase(Locale.ROOT)); // TODO: 5.0 Remove + op.vendorExtensions.put("x-uppercase-operation-id", underscoredOperationId.toUpperCase(Locale.ROOT)); + String vendorExtensionPath = op.path.replace("{", ":").replace("}", ""); + op.vendorExtensions.put("path", vendorExtensionPath); // TODO: 5.0 Remove + op.vendorExtensions.put("x-path",vendorExtensionPath); + op.vendorExtensions.put("PATH_ID", pathId); // TODO: 5.0 Remove + op.vendorExtensions.put("x-path-id", pathId); + op.vendorExtensions.put("hasPathParams", !op.pathParams.isEmpty()); // TODO: 5.0 Remove + op.vendorExtensions.put("x-has-path-params", !op.pathParams.isEmpty()); + + String vendorExtensionHttpMethod = Character.toUpperCase(op.httpMethod.charAt(0)) + op.httpMethod.substring(1).toLowerCase(Locale.ROOT); + op.vendorExtensions.put("HttpMethod", vendorExtensionHttpMethod); // TODO: 5.0 Remove + op.vendorExtensions.put("x-http-method", vendorExtensionHttpMethod); + for (CodegenParameter param : op.allParams) { processParam(param, op); } @@ -653,7 +668,8 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation processParam(param, op); // Give header params a name in camel case. CodegenParameters don't have a nameInCamelCase property. - param.vendorExtensions.put("typeName", toModelName(param.baseName)); + param.vendorExtensions.put("typeName", toModelName(param.baseName)); // TODO: 5.0 Remove + param.vendorExtensions.put("x-type-name", toModelName(param.baseName)); } // Set for deduplication of response IDs @@ -701,11 +717,17 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation responseIds.add(responseId); - rsp.vendorExtensions.put("x-responseId", responseId); - rsp.vendorExtensions.put("x-uppercaseResponseId", underscore(responseId).toUpperCase(Locale.ROOT)); - rsp.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase(Locale.ROOT)); + String underscoredResponseId = underscore(responseId).toUpperCase(Locale.ROOT); + rsp.vendorExtensions.put("x-responseId", responseId); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-response-id", responseId); + rsp.vendorExtensions.put("x-uppercaseResponseId", underscoredResponseId.toUpperCase(Locale.ROOT)); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-uppercase-response-id", underscoredResponseId.toUpperCase(Locale.ROOT)); + rsp.vendorExtensions.put("uppercase_operation_id", underscoredOperationId.toUpperCase(Locale.ROOT)); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-uppercase-operation-id", underscoredOperationId.toUpperCase(Locale.ROOT)); if (rsp.dataType != null) { - rsp.vendorExtensions.put("uppercase_data_type", (rsp.dataType.replace("models::", "")).toUpperCase(Locale.ROOT)); + String uppercaseDataType = (rsp.dataType.replace("models::", "")).toUpperCase(Locale.ROOT); + rsp.vendorExtensions.put("uppercase_data_type", uppercaseDataType); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-uppercase-data-type", uppercaseDataType); // Get the mimetype which is produced by this response. Note // that although in general responses produces a set of @@ -754,12 +776,14 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation outputMime = firstProduces; } - rsp.vendorExtensions.put("mimeType", outputMime); + rsp.vendorExtensions.put("mimeType", outputMime); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-mime-type", outputMime); // Write out the type of data we actually expect this response // to make. if (producesXml) { - rsp.vendorExtensions.put("producesXml", true); + rsp.vendorExtensions.put("producesXml", true); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-produces-xml", true); } else if (producesPlainText) { // Plain text means that there is not structured data in // this response. So it'll either be a UTF-8 encoded string @@ -770,12 +794,15 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation // base64 encoding should be done. They both look like // 'producesBytes'. if (rsp.dataType.equals(bytesType)) { - rsp.vendorExtensions.put("producesBytes", true); + rsp.vendorExtensions.put("producesBytes", true); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-produces-bytes", true); } else { - rsp.vendorExtensions.put("producesPlainText", true); + rsp.vendorExtensions.put("producesPlainText", true); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-produces-plain-text", true); } } else { - rsp.vendorExtensions.put("producesJson", true); + rsp.vendorExtensions.put("producesJson", true); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-produces-json", true); // If the data type is just "object", then ensure that the // Rust data type is "serde_json::Value". This allows us // to define APIs that can return arbitrary JSON bodies. @@ -791,7 +818,8 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation if ((model != null)) { XML xml = model.getXml(); if ((xml != null) && (xml.getNamespace() != null)) { - rsp.vendorExtensions.put("has_namespace", "true"); + rsp.vendorExtensions.put("has_namespace", "true"); // TODO: 5.0 Remove + rsp.vendorExtensions.put("x-has-namespace", "true"); } } } @@ -818,6 +846,9 @@ public Map postProcessOperationsWithModels(Map o Map operations = (Map) objs.get("operations"); List operationList = (List) operations.get("operation"); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenOperation op : operationList) { boolean consumesPlainText = false; boolean consumesXml = false; @@ -835,37 +866,47 @@ public Map postProcessOperationsWithModels(Map o } else if (isMimetypeWwwFormUrlEncoded(mediaType)) { additionalProperties.put("usesUrlEncodedForm", true); } else if (isMimetypeMultipartFormData(mediaType)) { - op.vendorExtensions.put("consumesMultipart", true); + op.vendorExtensions.put("consumesMultipart", true); // TODO: 5.0 Remove + op.vendorExtensions.put("x-consumes-multipart", true); additionalProperties.put("apiUsesMultipart", true); } } } } + String underscoredOperationId = underscore(op.operationId).toUpperCase(Locale.ROOT); if (op.bodyParam != null) { // Default to consuming json - op.bodyParam.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase(Locale.ROOT)); + op.bodyParam.vendorExtensions.put("uppercase_operation_id", underscoredOperationId); // TODO: 5.0 Remove + op.bodyParam.vendorExtensions.put("x-uppercase-operation-id", underscoredOperationId); if (consumesXml) { - op.bodyParam.vendorExtensions.put("consumesXml", true); + op.bodyParam.vendorExtensions.put("consumesXml", true); // TODO: 5.0 Remove + op.bodyParam.vendorExtensions.put("x-consumes-xml", true); } else if (consumesPlainText) { - op.bodyParam.vendorExtensions.put("consumesPlainText", true); + op.bodyParam.vendorExtensions.put("consumesPlainText", true); // TODO: 5.0 Remove + op.bodyParam.vendorExtensions.put("x-consumes-plain-text", true); } else { - op.bodyParam.vendorExtensions.put("consumesJson", true); + op.bodyParam.vendorExtensions.put("consumesJson", true); // TODO: 5.0 Remove + op.bodyParam.vendorExtensions.put("x-consumes-json", true); } } for (CodegenParameter param : op.bodyParams) { processParam(param, op); - param.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase(Locale.ROOT)); + param.vendorExtensions.put("uppercase_operation_id", underscoredOperationId); // TODO: 5.0 Remove + param.vendorExtensions.put("x-uppercase-operation-id", underscoredOperationId); // Default to producing json if nothing else is specified if (consumesXml) { - param.vendorExtensions.put("consumesXml", true); + param.vendorExtensions.put("consumesXml", true); // TODO: 5.0 Remove + param.vendorExtensions.put("x-consumes-xml", true); } else if (consumesPlainText) { - param.vendorExtensions.put("consumesPlainText", true); + param.vendorExtensions.put("consumesPlainText", true); // TODO: 5.0 Remove + param.vendorExtensions.put("x-consumes-plain-text", true); } else { - param.vendorExtensions.put("consumesJson", true); + param.vendorExtensions.put("consumesJson", true); // TODO: 5.0 Remove + param.vendorExtensions.put("x-consumes-json", true); } } @@ -885,7 +926,8 @@ public Map postProcessOperationsWithModels(Map o for (CodegenSecurity s : op.authMethods) { if (s.isApiKey && s.isKeyInHeader) { - s.vendorExtensions.put("x-apiKeyName", toModelName(s.keyParamName)); + s.vendorExtensions.put("x-apiKeyName", toModelName(s.keyParamName)); // TODO: 5.0 Remove + s.vendorExtensions.put("x-api-key-name", toModelName(s.keyParamName)); headerAuthMethods = true; } @@ -895,7 +937,8 @@ public Map postProcessOperationsWithModels(Map o } if (headerAuthMethods) { - op.vendorExtensions.put("hasHeaderAuthMethods", "true"); + op.vendorExtensions.put("hasHeaderAuthMethods", "true"); // TODO: 5.0 Remove + op.vendorExtensions.put("x-has-header-auth-methods", "true"); } } } @@ -994,9 +1037,14 @@ public String toInstantiationType(Schema p) { @Override public CodegenModel fromModel(String name, Schema model) { + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + Map allDefinitions = ModelUtils.getSchemas(this.openAPI); CodegenModel mdl = super.fromModel(name, model); - mdl.vendorExtensions.put("upperCaseName", name.toUpperCase(Locale.ROOT)); + mdl.vendorExtensions.put("upperCaseName", name.toUpperCase(Locale.ROOT)); // TODO: 5.0 Remove + mdl.vendorExtensions.put("x-upper-case-name", name.toUpperCase(Locale.ROOT)); if (!StringUtils.isEmpty(model.get$ref())) { Schema schema = allDefinitions.get(ModelUtils.getSimpleRef(model.get$ref())); mdl.dataType = typeMapping.get(schema.getType()); @@ -1027,7 +1075,8 @@ public CodegenModel fromModel(String name, Schema model) { // If this model's items require wrapping in xml, squirrel away the // xml name so we can insert it into the relevant model fields. if (xmlName != null) { - mdl.vendorExtensions.put("itemXmlName", xmlName); + mdl.vendorExtensions.put("itemXmlName", xmlName); // TODO: 5.0 Remove + mdl.vendorExtensions.put("x-item-xml-name", xmlName); modelXmlNames.put("models::" + mdl.classname, xmlName); } @@ -1051,6 +1100,9 @@ public CodegenModel fromModel(String name, Schema model) { public Map postProcessAllModels(Map objs) { Map newObjs = super.postProcessAllModels(objs); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + //Index all CodegenModels by model name. HashMap allModels = new HashMap(); for (Entry entry : objs.entrySet()) { @@ -1078,7 +1130,8 @@ public Map postProcessAllModels(Map objs) { String xmlName = modelXmlNames.get(prop.dataType); if (xmlName != null) { - prop.vendorExtensions.put("itemXmlName", xmlName); + prop.vendorExtensions.put("itemXmlName", xmlName); // TODO: 5.0 Remove + prop.vendorExtensions.put("x-item-xml-name", xmlName); } } } @@ -1249,6 +1302,10 @@ private String matchingIntType(boolean unsigned, Long inclusiveMin, Long inclusi @Override public Map postProcessModels(Map objs) { List models = (List) objs.get("models"); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Object _mo : models) { Map mo = (Map) _mo; CodegenModel cm = (CodegenModel) mo.get("model"); @@ -1286,7 +1343,8 @@ public Map postProcessModels(Map objs) { cm.dataType = typeMapping.get(cm.dataType); } - cm.vendorExtensions.put("isString", "String".equals(cm.dataType)); + cm.vendorExtensions.put("isString", "String".equals(cm.dataType)); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-is-string", "String".equals(cm.dataType)); } return super.postProcessModelsEnum(objs); } @@ -1294,28 +1352,36 @@ public Map postProcessModels(Map objs) { private void processParam(CodegenParameter param, CodegenOperation op) { String example = null; + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + // If a parameter uses UUIDs, we need to import the UUID package. if (param.dataType.equals(uuidType)) { additionalProperties.put("apiUsesUuid", true); } if (param.isString) { - param.vendorExtensions.put("formatString", "\\\"{}\\\""); + param.vendorExtensions.put("formatString", "\\\"{}\\\""); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "\\\"{}\\\""); // TODO: 5.0 Remove example = "\"" + ((param.example != null) ? param.example : "") + "\".to_string()"; } else if (param.isPrimitiveType) { if ((param.isByteArray) || (param.isBinary)) { // Binary primitive types don't implement `Display`. - param.vendorExtensions.put("formatString", "{:?}"); + param.vendorExtensions.put("formatString", "{:?}"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "{:?}"); example = "swagger::ByteArray(Vec::from(\"" + ((param.example != null) ? param.example : "") + "\"))"; } else { - param.vendorExtensions.put("formatString", "{}"); + param.vendorExtensions.put("formatString", "{}"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "{}"); example = (param.example != null) ? param.example : ""; } } else if (param.isListContainer) { - param.vendorExtensions.put("formatString", "{:?}"); + param.vendorExtensions.put("formatString", "{:?}"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "{:?}"); example = (param.example != null) ? param.example : "&Vec::new()"; } else { - param.vendorExtensions.put("formatString", "{:?}"); + param.vendorExtensions.put("formatString", "{:?}"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "{:?}"); if (param.example != null) { example = "serde_json::from_str::<" + param.dataType + ">(\"" + param.example + "\").expect(\"Failed to parse JSON example\")"; } @@ -1323,22 +1389,31 @@ private void processParam(CodegenParameter param, CodegenOperation op) { if (param.required) { if (example != null) { - param.vendorExtensions.put("example", example); + param.vendorExtensions.put("example", example); // TODO: 5.0 Remove + param.vendorExtensions.put("x-example", example); } else if (param.isListContainer) { // Use the empty list if we don't have an example - param.vendorExtensions.put("example", "&Vec::new()"); + param.vendorExtensions.put("example", "&Vec::new()"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-example", "&Vec::new()"); } else { // If we don't have an example that we can provide, we need to disable the client example, as it won't build. - param.vendorExtensions.put("example", "???"); - op.vendorExtensions.put("noClientExample", Boolean.TRUE); + param.vendorExtensions.put("example", "???"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-example", "???"); + op.vendorExtensions.put("noClientExample", Boolean.TRUE); // TODO: 5.0 Remove + op.vendorExtensions.put("x-no-client-example", Boolean.TRUE); } } else if ((param.dataFormat != null) && ((param.dataFormat.equals("date-time")) || (param.dataFormat.equals("date")))) { - param.vendorExtensions.put("formatString", "{:?}"); - param.vendorExtensions.put("example", "None"); + param.vendorExtensions.put("formatString", "{:?}"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "{:?}"); + param.vendorExtensions.put("example", "None"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-example", "None"); } else { // Not required, so override the format string and example - param.vendorExtensions.put("formatString", "{:?}"); - param.vendorExtensions.put("example", (example != null) ? "Some(" + example + ")" : "None"); + param.vendorExtensions.put("formatString", "{:?}"); // TODO: 5.0 Remove + param.vendorExtensions.put("x-format-string", "{:?}"); + String exampleString = (example != null) ? "Some(" + example + ")" : "None"; + param.vendorExtensions.put("example", exampleString); // TODO: 5.0 Remove + param.vendorExtensions.put("x-example", exampleString); } } } 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 e830d1b3168a..000f0add07c9 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 @@ -22,11 +22,16 @@ import org.openapitools.codegen.*; 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.*; +import static org.openapitools.codegen.utils.OnceLogger.once; + public class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(ScalaFinchServerCodegen.class); protected String invokerPackage = "org.openapitools.client"; protected String groupId = "org.openapitools"; protected String artifactId = "finch-server"; @@ -340,6 +345,10 @@ private void authParameters(CodegenOperation op) { String authParams = ""; String authInputParams = ""; String typedAuthInputParams = ""; + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + //Append apikey security to path params and create input parameters for functions if (op.authMethods != null) { @@ -356,9 +365,13 @@ private void authParameters(CodegenOperation op) { } } - op.vendorExtensions.put("x-codegen-authParams", authParams); - op.vendorExtensions.put("x-codegen-authInputParams", authInputParams); - op.vendorExtensions.put("x-codegen-typedAuthInputParams", typedAuthInputParams); + op.vendorExtensions.put("x-codegen-authParams", authParams); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-authInputParams", authInputParams); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-typedAuthInputParams", typedAuthInputParams); // TODO: 5.0 Remove + + op.vendorExtensions.put("x-codegen-auth-params", authParams); + op.vendorExtensions.put("x-codegen-auth-input-params", authInputParams); + op.vendorExtensions.put("x-codegen-typed-auth-input-params", typedAuthInputParams); } private void generateScalaPath(CodegenOperation op) { @@ -402,6 +415,9 @@ private void generateScalaPath(CodegenOperation op) { private void concatParameters(CodegenOperation op) { + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + String path = colConcat(colConcat(op.vendorExtensions.get("x-codegen-path").toString(), op.vendorExtensions.get("x-codegen-pathParams").toString()), op.vendorExtensions.get("x-codegen-authParams").toString()); String parameters = csvConcat(op.vendorExtensions.get("x-codegen-inputParams").toString(), op.vendorExtensions.get("x-codegen-authInputParams").toString()); String typedParameters = csvConcat(op.vendorExtensions.get("x-codegen-typedInputParams").toString(), op.vendorExtensions.get("x-codegen-typedAuthInputParams").toString()); @@ -409,13 +425,17 @@ private void concatParameters(CodegenOperation op) { // The input parameters for functions op.vendorExtensions.put("x-codegen-paths", path); op.vendorExtensions.put("x-codegen-params", parameters); - op.vendorExtensions.put("x-codegen-typedParams", typedParameters); + op.vendorExtensions.put("x-codegen-typedParams", typedParameters); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-typed-params", typedParameters); } private void generateInputParameters(CodegenOperation op) { + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + String inputParams = ""; String typedInputParams = ""; String pathParams = ""; @@ -462,11 +482,14 @@ private void generateInputParameters(CodegenOperation op) { } // All body, path, query and header parameters - op.vendorExtensions.put("x-codegen-pathParams", pathParams); + op.vendorExtensions.put("x-codegen-pathParams", pathParams); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-path-params", pathParams); // The input parameters for functions - op.vendorExtensions.put("x-codegen-inputParams", inputParams); - op.vendorExtensions.put("x-codegen-typedInputParams", typedInputParams); + op.vendorExtensions.put("x-codegen-inputParams", inputParams); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-input-params", inputParams); + op.vendorExtensions.put("x-codegen-typedInputParams", typedInputParams); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-typed-input-params", typedInputParams); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index b0684b48be6c..11acf405ff22 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -35,6 +35,7 @@ import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.rightPad; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.camelize; public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implements CodegenConfig { @@ -255,6 +256,9 @@ public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); Map modelsByClassName = new HashMap<>(); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (Object _outer : objs.values()) { Map outer = (Map) _outer; List> models = (List>) outer.get("models"); @@ -265,7 +269,8 @@ public Map postProcessAllModels(Map objs) { cm.classVarName = camelize(cm.classVarName, true); modelsByClassName.put(cm.classname, cm); boolean hasFiles = cm.vars.stream().anyMatch(var -> var.isFile); - cm.vendorExtensions.put("hasFiles", hasFiles); + cm.vendorExtensions.put("hasFiles", hasFiles); // TODO: 5.0 Remove + cm.vendorExtensions.put("x-has-files", hasFiles); } } @@ -282,6 +287,9 @@ public Map postProcessSupportingFileData(Map obj objs = super.postProcessSupportingFileData(objs); generateJSONSpecFile(objs); + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + // Prettify routes file Map apiInfo = (Map) objs.get("apiInfo"); List> apis = (List>) apiInfo.get("apis"); @@ -292,8 +300,15 @@ public Map postProcessSupportingFileData(Map obj int maxPathLength = ops.stream() .mapToInt(op -> op.httpMethod.length() + op.path.length()) .reduce(0, Integer::max); - ops.forEach(op -> op.vendorExtensions.put("paddedPath", rightPad(op.path, maxPathLength - op.httpMethod.length()))); - ops.forEach(op -> op.vendorExtensions.put("hasPathParams", op.getHasPathParams())); + ops.forEach(op -> { + String paddedPath = rightPad(op.path, maxPathLength - op.httpMethod.length()); + op.vendorExtensions.put("paddedPath", paddedPath); // TODO: 5.0 Remove + op.vendorExtensions.put("x-padded-path", paddedPath); + }); + ops.forEach(op -> { + op.vendorExtensions.put("hasPathParams", op.getHasPathParams()); // TODO: 5.0 Remove + op.vendorExtensions.put("x-has-path-params", op.getHasPathParams()); + }); return objs; } 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 13f1e3689bab..2c523d6c6b0b 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 @@ -35,6 +35,7 @@ import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.*; public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfig { @@ -201,13 +202,20 @@ public void preprocessOpenAPI(OpenAPI openAPI) { @Override public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, List servers) { CodegenOperation op = super.fromOperation(path, httpMethod, operation, servers); + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (op.returnType != null) { op.returnType = normalizeType(op.returnType); } //path is an unescaped variable in the mustache template api.mustache line 82 '<&path>' op.path = sanitizePath(op.path); - op.vendorExtensions.put("x-codegen-httpMethodUpperCase", httpMethod.toUpperCase(Locale.ROOT)); + + String methodUpperCase = httpMethod.toUpperCase(Locale.ROOT); + op.vendorExtensions.put("x-codegen-httpMethodUpperCase", methodUpperCase); // TODO: 5.0 Remove + op.vendorExtensions.put("x-codegen-http-method-upper-case", methodUpperCase); return op; } @@ -239,6 +247,10 @@ private void preparHtmlForGlobalDescription(OpenAPI openAPI) { */ public List postProcessParameterEnum(List parameterList) { String enumFormatted = ""; + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + for (CodegenParameter parameter : parameterList) { if (parameter.isEnum) { for (int i = 0; i < parameter._enum.size(); i++) { @@ -248,8 +260,11 @@ public List postProcessParameterEnum(List pa enumFormatted += "`" + parameter._enum.get(i) + "`" + spacer; } Markdown markInstance = new Markdown(); - if (!enumFormatted.isEmpty()) - parameter.vendorExtensions.put("x-eumFormatted", markInstance.toHtml(enumFormatted)); + if (!enumFormatted.isEmpty()) { + String formattedExtension = markInstance.toHtml(enumFormatted); + parameter.vendorExtensions.put("x-eumFormatted", formattedExtension); // TODO: 5.0 Remove + parameter.vendorExtensions.put("x-eum-formatted", formattedExtension); + } } } return parameterList; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 373a1e33a8ed..b2f2dc213d3f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -29,6 +29,8 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.OnceLogger.once; + public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractTypeScriptClientCodegen.class); @@ -259,8 +261,13 @@ private void updateOperationParameterEnumInformation(Map operati } private void setParamNameAlternative(CodegenParameter param, String paramName, String paramNameAlternative) { + + // TODO: 5.0: Remove the camelCased vendorExtension below and ensure templates use the newer property naming. + once(LOGGER).warn("4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix."); + if (param.paramName.equals(paramName)) { - param.vendorExtensions.put("paramNameAlternative", paramNameAlternative); + param.vendorExtensions.put("paramNameAlternative", paramNameAlternative); // TODO: 5.0 Remove + param.vendorExtensions.put("x-param-name-alternative", paramNameAlternative); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OnceLogger.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OnceLogger.java new file mode 100644 index 000000000000..b90a9338981e --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OnceLogger.java @@ -0,0 +1,173 @@ +package org.openapitools.codegen.utils; + +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.Ticker; +import org.openapitools.codegen.config.GlobalSettings; +import org.slf4j.Logger; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; +import org.slf4j.ext.LoggerWrapper; + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Provides calling code a way to log important messages only once, regardless of how many times the invocation has occurred. + * This can be used, for instance, to log a warning like "One or more schemas aren't declared" without logging that message + * for every time the schema is mentioned in a document. + * + * This implementation currently only supports single-argument string literal log methods (e.g. {@link Logger#debug(String)}). + */ +@SuppressWarnings("FieldCanBeLocal") +public class OnceLogger extends LoggerWrapper { + /** + * Allow advanced users to modify cache size of the OnceLogger (more for performance tuning in hosted environments) + */ + static final String CACHE_SIZE_PROPERTY = "org.openapitools.codegen.utils.oncelogger.cachesize"; + + /** + * Allow advanced users to disable the OnceLogger (more for performance tuning in hosted environments). + * This is really only useful or necessary if this implementation causes issues. + */ + static final String ENABLE_ONCE_LOGGER_PROPERTY = "org.openapitools.codegen.utils.oncelogger.enabled"; + + /** + * Allow advanced users to modify cache expiration of the OnceLogger (more for performance tuning in hosted environments) + */ + static final String EXPIRY_PROPERTY = "org.openapitools.codegen.utils.oncelogger.expiry"; + + /** + * Internal message cache for logger decorated with the onceler. + */ + static Cache messageCountCache; + + /** + * The fully qualified class name of the logger instance, + * typically the logger class, logger bridge or a logger wrapper. + */ + private static final String FQCN = OnceLogger.class.getName(); + + /** + * Gets the marker instance. This can be used by supported log implementations to filter/manage logs coming from + * this implementation differently than others (i.e. make them stand out since they're to be logged once). + */ + private static final Marker MARKER = MarkerFactory.getMarker("ONCE"); + + /** + * The allowed size of the cache. + */ + private static int maxCacheSize = Integer.parseInt(GlobalSettings.getProperty(CACHE_SIZE_PROPERTY, "200")); + + /** + * The millis to expire a cached log message. + */ + private static int expireMillis = Integer.parseInt(GlobalSettings.getProperty(EXPIRY_PROPERTY, "2000")); + + /** + * The number of allowed repetitions. + */ + private static int maxRepetitions = 1; + + OnceLogger(Logger logger) { + this(logger, FQCN); + } + + OnceLogger(Logger logger, String fqcn) { + super(logger, fqcn); + } + + static { + caffeineCache(Ticker.systemTicker(), expireMillis); + } + + static void caffeineCache(Ticker ticker, int expireMillis) { + // Initializes a cache which holds an atomic counter of log message instances. + // The intent is to debounce log messages such that they occur at most [maxRepetitions] per [expireMillis]. + messageCountCache = Caffeine.newBuilder() + .maximumSize(maxCacheSize) + .expireAfterWrite(expireMillis, TimeUnit.MILLISECONDS) + .ticker(ticker) + .build(); + } + + public static Logger once(Logger logger) { + try { + if (Boolean.parseBoolean(GlobalSettings.getProperty(ENABLE_ONCE_LOGGER_PROPERTY, "true"))) { + return new OnceLogger(logger); + } + } catch (Exception ex) { + logger.warn("Unable to wrap logger instance in OnceLogger. Falling back to non-decorated implementation, which may be noisy."); + } + return logger; + } + + /** + * Delegate to the appropriate method of the underlying logger. + * + * @param msg The log message. + */ + @Override + public void trace(String msg) { + if (!isTraceEnabled() || !isTraceEnabled(MARKER)) return; + + if (shouldLog(msg)) super.trace(MARKER, msg); + } + + @SuppressWarnings("ConstantConditions") + private boolean shouldLog(final String msg) { + AtomicInteger counter = messageCountCache.get(msg, i -> new AtomicInteger(0)); + return counter.incrementAndGet() <= maxRepetitions; + } + + /** + * Delegate to the appropriate method of the underlying logger. + * + * @param msg The log message. + */ + @Override + public void debug(String msg) { + if (!isDebugEnabled() || !isDebugEnabled(MARKER)) return; + + if (shouldLog(msg)) super.debug(MARKER, msg); + } + + /** + * Delegate to the appropriate method of the underlying logger. + * + * @param msg The log message. + */ + @Override + public void info(String msg) { + if (!isInfoEnabled() || !isInfoEnabled(MARKER)) return; + + if (shouldLog(msg)) super.info(MARKER, msg); + } + + /** + * Delegate to the appropriate method of the underlying logger. + * + * @param msg The log message. + */ + @Override + public void warn(String msg) { + if (!isWarnEnabled() || !isWarnEnabled(MARKER)) return; + + if (shouldLog(msg)) super.warn(MARKER, msg); + } + + /** + * Delegate to the appropriate method of the underlying logger. + * + * Use this method sparingly. If you're limiting error messages, ask yourself + * whether your log fits better as a warning. + * + * @param msg The log message. + */ + @Override + public void error(String msg) { + if (!isErrorEnabled() || !isErrorEnabled(MARKER)) return; + + if (shouldLog(msg)) super.error(MARKER, msg); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/OnceLoggerTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/OnceLoggerTest.java new file mode 100644 index 000000000000..280079c9ac8e --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/OnceLoggerTest.java @@ -0,0 +1,114 @@ +package org.openapitools.codegen.utils; + +import com.google.common.base.Ticker; +import com.google.common.testing.FakeTicker; +import org.mockito.Mockito; +import org.openapitools.codegen.config.GlobalSettings; +import org.slf4j.Logger; +import org.slf4j.Marker; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.mockito.Mockito.*; +import static org.openapitools.codegen.utils.OnceLogger.*; +import static org.testng.Assert.*; + +@SuppressWarnings({"SameParameterValue", "UnstableApiUsage"}) +public class OnceLoggerTest { + private Logger mockLogger = Mockito.mock(Logger.class); + private FakeTicker ticker = new FakeTicker(); + + @BeforeTest + public void setUp(){ + OnceLogger.caffeineCache(ticker::read, 1000); + } + + @AfterMethod + public void afterEach() { + OnceLogger.messageCountCache.asMap().clear(); + } + + @BeforeMethod + public void beforeEach() { + Mockito.reset(mockLogger); + } + + @Test + public void onceLogsMessagesOnceWithinTimeLimit() throws InterruptedException { + String message = "onceLogsMessagesOnceWithinTimeLimit"; + Logger instance = once(mockLogger); + when(mockLogger.isWarnEnabled()).thenReturn(true); + when(mockLogger.isWarnEnabled(any(Marker.class))).thenReturn(true); + + for (int i = 0; i < 50; i++) { + instance.warn(message); + } + + AtomicInteger counter1 = messageCountCache.getIfPresent(message); + assertNotNull(counter1); + assertEquals(counter1.get(), 50); + + ticker.advance(1100L, TimeUnit.MILLISECONDS); + + AtomicInteger noCounter = messageCountCache.getIfPresent(message); + assertNull(noCounter); + verify(mockLogger, times(1)).warn(any(Marker.class), same(message)); + + for (int i = 0; i < 50; i++) { + instance.warn(message); + } + + ticker.advance(5, TimeUnit.MILLISECONDS); + + AtomicInteger counter2 = messageCountCache.getIfPresent(message); + + assertNotNull(counter2); + assertNotEquals(counter2, counter1); + assertEquals(counter2.get(), 50); + verify(mockLogger, times(2)).warn(any(Marker.class), same(message)); + } + + @Test + public void onceLogsOneMessageByDefault() { + String message = "onceLogsOneMessageByDefault"; + Logger instance = once(mockLogger); + when(mockLogger.isWarnEnabled()).thenReturn(true); + when(mockLogger.isWarnEnabled(any(Marker.class))).thenReturn(true); + + for (int i = 0; i < 50; i++) { + instance.warn(message); + } + + verify(mockLogger, times(1)).warn(any(Marker.class), same(message)); + } + + @Test + public void onceReturnsDecoratedLogger() { + Logger instance = once(mockLogger); + assertTrue(instance instanceof OnceLogger); + } + + @Test + public void onceReturnsOriginalLoggerWhenDisabled() { + String originalSetting = GlobalSettings.getProperty(ENABLE_ONCE_LOGGER_PROPERTY); + try { + GlobalSettings.setProperty(ENABLE_ONCE_LOGGER_PROPERTY, "false"); + Logger instance = once(mockLogger); + assertFalse(instance instanceof OnceLogger); + } finally { + resetGlobalProperty(ENABLE_ONCE_LOGGER_PROPERTY, originalSetting); + } + } + + private void resetGlobalProperty(String key, String value) { + if (value != null) + GlobalSettings.setProperty(key, value); + else + GlobalSettings.clearProperty(key); + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 29c6a6767d61..062b7843d9b9 100644 --- a/pom.xml +++ b/pom.xml @@ -225,6 +225,9 @@ none:none org.testng:testng @{argLine} -XX:+StartAttachListener + + 1000 + From cc0fe06d1cf875e03a21cfa4f83259235c37701f Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Thu, 6 Feb 2020 09:48:23 -0800 Subject: [PATCH 70/72] [python] use datetime aware object (#5209) * python use aware datetime object * python use aware datetime object * python use aware datetime object * python use aware datetime object * python use aware datetime object * python use aware datetime object --- .../python-experimental/signing.mustache | 22 +++++++------------ .../petstore_api/signing.py | 22 +++++++------------ 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache index 300efa007bfc..f52feb8f12a8 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/signing.mustache @@ -7,13 +7,12 @@ 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 datetime import datetime from email.utils import formatdate import json import os import re from six.moves.urllib.parse import urlencode, urlparse -from time import mktime +from time import time # 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. @@ -228,12 +227,6 @@ class HttpSigningConfiguration(object): "Signing algorithm {0} is not compatible with private key".format( self.signing_algorithm)) - def _get_unix_time(self, ts): - """Converts and returns a datetime object to UNIX time, the number of seconds - elapsed since January 1, 1970 UTC. - """ - return (ts - datetime(1970, 1, 1)).total_seconds() - 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. @@ -262,15 +255,16 @@ class HttpSigningConfiguration(object): if query_params: request_target += "?" + urlencode(query_params) - # Get current time and generate RFC 1123 (HTTP/1.1) date/time string. - now = datetime.now() - stamp = mktime(now.timetuple()) - cdate = formatdate(timeval=stamp, localtime=False, usegmt=True) + # 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(self._get_unix_time(now)) + created = int(now) if self.signature_max_validity is not None: - expires = self._get_unix_time(now + self.signature_max_validity) + expires = now + self.signature_max_validity.total_seconds() signed_headers_list = [] request_headers_dict = {} diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py index 758f62fc0c29..bce994648838 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/signing.py @@ -15,13 +15,12 @@ from Crypto.Hash import SHA256, SHA512 from Crypto.PublicKey import RSA, ECC from Crypto.Signature import PKCS1_v1_5, pss, DSS -from datetime import datetime from email.utils import formatdate import json import os import re from six.moves.urllib.parse import urlencode, urlparse -from time import mktime +from time import time # 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. @@ -236,12 +235,6 @@ def _load_private_key(self): "Signing algorithm {0} is not compatible with private key".format( self.signing_algorithm)) - def _get_unix_time(self, ts): - """Converts and returns a datetime object to UNIX time, the number of seconds - elapsed since January 1, 1970 UTC. - """ - return (ts - datetime(1970, 1, 1)).total_seconds() - 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. @@ -270,15 +263,16 @@ def _get_signed_header_info(self, resource_path, method, headers, body, query_pa if query_params: request_target += "?" + urlencode(query_params) - # Get current time and generate RFC 1123 (HTTP/1.1) date/time string. - now = datetime.now() - stamp = mktime(now.timetuple()) - cdate = formatdate(timeval=stamp, localtime=False, usegmt=True) + # 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(self._get_unix_time(now)) + created = int(now) if self.signature_max_validity is not None: - expires = self._get_unix_time(now + self.signature_max_validity) + expires = now + self.signature_max_validity.total_seconds() signed_headers_list = [] request_headers_dict = {} From 197cea3248b66b11ed22da6cd0760804b1737776 Mon Sep 17 00:00:00 2001 From: Alexey Makhrov Date: Thu, 6 Feb 2020 11:21:06 -0800 Subject: [PATCH 71/72] [core][typescript][perl] Ensure model.parent is also added to model.allParents with multiple inheritance (#5182) * Add real assertions in DefaultCodegenTest.java testAllOfXXX methods * Add test to DefaultCodegenTest for an allOf composition with a single ref and no own props * Ensure model.parent is also added to model.allParents when multipleInheritance is supported * Cleanup: remove LOGGER.debug, renamed refedParentNames to refedWithoutDiscriminator --- .../codegen/utils/ModelUtils.java | 19 ++++++--- .../codegen/DefaultCodegenTest.java | 41 +++++++++++++++---- .../test/resources/2_0/composed-allof.yaml | 7 +++- 3 files changed, 51 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 9ae3f6ed3215..2915e039f1dc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -972,7 +972,8 @@ public static List getInterfaces(ComposedSchema composed) { public static String getParentName(ComposedSchema composedSchema, Map allSchemas) { List interfaces = getInterfaces(composedSchema); - List refedParentNames = new ArrayList<>(); + List refedWithoutDiscriminator = new ArrayList<>(); + if (interfaces != null && !interfaces.isEmpty()) { for (Schema schema : interfaces) { // get the actual schema @@ -986,9 +987,8 @@ public static String getParentName(ComposedSchema composedSchema, Map getAllParentsName(ComposedSchema composedSchema, Map allSchemas, boolean includeAncestors) { List interfaces = getInterfaces(composedSchema); List names = new ArrayList(); + List refedWithoutDiscriminator = new ArrayList<>(); if (interfaces != null && !interfaces.isEmpty()) { for (Schema schema : interfaces) { @@ -1035,8 +1036,8 @@ public static List getAllParentsName(ComposedSchema composedSchema, Map< names.addAll(getAllParentsName((ComposedSchema) s, allSchemas, true)); } } else { - LOGGER.debug("Not a parent since discriminator.propertyName is not set {}", s.get$ref()); // not a parent since discriminator.propertyName is not set + refedWithoutDiscriminator.add(parentName); } } else { // not a ref, doing nothing @@ -1044,6 +1045,12 @@ public static List getAllParentsName(ComposedSchema composedSchema, Map< } } + if (names.size() == 0 && refedWithoutDiscriminator.size() == 1) { + LOGGER.warn("[deprecated] inheritance without use of 'discriminator.propertyName' is deprecated " + + "and will be removed in a future release. Generating model for {}. Title: {}", composedSchema.getName(), composedSchema.getTitle()); + return refedWithoutDiscriminator; + } + return names; } 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 83dfc91ebd25..0511b10f723a 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 @@ -528,9 +528,31 @@ public void testAllOfRequired() { Schema child = openAPI.getComponents().getSchemas().get("clubForCreation"); codegen.setOpenAPI(openAPI); CodegenModel childModel = codegen.fromModel("clubForCreation", child); - showVars(childModel); + Assert.assertEquals(getRequiredVars(childModel), Collections.singletonList("name")); } + @Test + public void testAllOfSingleRefNoOwnProps() { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/composed-allof.yaml"); + final DefaultCodegen codegen = new CodegenWithMultipleInheritance(); + + Schema schema = openAPI.getComponents().getSchemas().get("NewMessageEventCoreNoOwnProps"); + codegen.setOpenAPI(openAPI); + CodegenModel model = codegen.fromModel("NewMessageEventCoreNoOwnProps", schema); + Assert.assertEquals(getNames(model.getVars()), Collections.emptyList()); + Assert.assertEquals(model.parent, "MessageEventCore"); + Assert.assertEquals(model.allParents, Collections.singletonList("MessageEventCore")); + } + + class CodegenWithMultipleInheritance extends DefaultCodegen { + public CodegenWithMultipleInheritance() { + super(); + supportsInheritance = true; + supportsMultipleInheritance = true; + } + } + + @Test public void testAllOfParent() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/allOf-required-parent.yaml"); @@ -539,24 +561,25 @@ public void testAllOfParent() { Schema person = openAPI.getComponents().getSchemas().get("person"); CodegenModel personModel = codegen.fromModel("person", person); - showVars(personModel); + Assert.assertEquals(getRequiredVars(personModel), Arrays.asList("firstName", "name", "email", "id")); Schema personForCreation = openAPI.getComponents().getSchemas().get("personForCreation"); CodegenModel personForCreationModel = codegen.fromModel("personForCreation", personForCreation); - showVars(personForCreationModel); + Assert.assertEquals(getRequiredVars(personForCreationModel), Arrays.asList("firstName", "name", "email")); Schema personForUpdate = openAPI.getComponents().getSchemas().get("personForUpdate"); CodegenModel personForUpdateModel = codegen.fromModel("personForUpdate", personForUpdate); - showVars(personForUpdateModel); + Assert.assertEquals(getRequiredVars(personForUpdateModel), Collections.emptyList()); } - private void showVars(CodegenModel model) { - if(model.getRequiredVars() != null) { - - System.out.println(model.getRequiredVars().stream().map(v -> v.name).collect(Collectors.toList())); - } + private List getRequiredVars(CodegenModel model) { + return getNames(model.getRequiredVars()); } + private List getNames(List props) { + if(props == null) return null; + return props.stream().map(v -> v.name).collect(Collectors.toList()); + } @Test public void testCallbacks() { diff --git a/modules/openapi-generator/src/test/resources/2_0/composed-allof.yaml b/modules/openapi-generator/src/test/resources/2_0/composed-allof.yaml index 579c2f796b4b..ca79c2eb3587 100644 --- a/modules/openapi-generator/src/test/resources/2_0/composed-allof.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/composed-allof.yaml @@ -50,4 +50,9 @@ definitions: p1: type: string p2: - type: string \ No newline at end of file + type: string + + NewMessageEventCoreNoOwnProps: + type: object + allOf: + - $ref: "#/definitions/MessageEventCore" From c943ecfe285625d5cdcef70e0f276fdfbe2dc938 Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Thu, 6 Feb 2020 13:58:17 -0800 Subject: [PATCH 72/72] [Python] 5094 followup - Reduce redundancy in docs (#5161) * Reduce redundancy in python docs This is a followup to PR #5094, which had a few unresolved comments at merge time. This reduces the amount of redundant lines in the api example doc templates, and ensures that referenced Configuration objects are actually instantiated. * Regenerate samples --- .../resources/python/api_doc_example.mustache | 11 ++----- .../api_doc_example.mustache | 11 ++----- .../python/python_doc_auth_partial.mustache | 3 ++ .../petstore/python-asyncio/docs/FakeApi.md | 1 + .../docs/FakeClassnameTags123Api.md | 1 + .../petstore/python-asyncio/docs/PetApi.md | 9 ++++++ .../petstore/python-asyncio/docs/StoreApi.md | 1 + .../docs/AnotherFakeApi.md | 2 +- .../python-experimental/docs/FakeApi.md | 29 ++++++++++--------- .../docs/FakeClassnameTags123Api.md | 1 + .../python-experimental/docs/PetApi.md | 9 ++++++ .../python-experimental/docs/StoreApi.md | 7 +++-- .../python-experimental/docs/UserApi.md | 16 +++++----- .../petstore/python-tornado/docs/FakeApi.md | 1 + .../docs/FakeClassnameTags123Api.md | 1 + .../petstore/python-tornado/docs/PetApi.md | 9 ++++++ .../petstore/python-tornado/docs/StoreApi.md | 1 + .../client/petstore/python/docs/FakeApi.md | 1 + .../python/docs/FakeClassnameTags123Api.md | 1 + samples/client/petstore/python/docs/PetApi.md | 9 ++++++ .../client/petstore/python/docs/StoreApi.md | 1 + .../docs/AnotherFakeApi.md | 2 +- .../python-experimental/docs/DefaultApi.md | 2 +- .../python-experimental/docs/FakeApi.md | 26 +++++++++-------- .../docs/FakeClassnameTags123Api.md | 1 + .../python-experimental/docs/PetApi.md | 9 ++++++ .../python-experimental/docs/StoreApi.md | 7 +++-- .../python-experimental/docs/UserApi.md | 16 +++++----- .../client/petstore/python/docs/FakeApi.md | 2 ++ .../python/docs/FakeClassnameTags123Api.md | 1 + .../client/petstore/python/docs/PetApi.md | 9 ++++++ .../client/petstore/python/docs/StoreApi.md | 1 + 32 files changed, 133 insertions(+), 68 deletions(-) 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 e86c5d6011cc..dadb8f6a96b5 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 @@ -5,24 +5,17 @@ import {{{packageName}}} from {{{packageName}}}.rest import ApiException from pprint import pprint {{> python_doc_auth_partial}} -{{#hasAuthMethods}} -# Defining host is optional and default to {{{basePath}}} -configuration.host = "{{{basePath}}}" # Enter a context with an instance of the API client +{{#hasAuthMethods}} with {{{packageName}}}.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = {{{packageName}}}.{{{classname}}}(api_client) - {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/allParams}} {{/hasAuthMethods}} {{^hasAuthMethods}} -# Enter a context with an instance of the API client with {{{packageName}}}.ApiClient() as api_client: +{{/hasAuthMethods}} # Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}(api_client) {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} -{{/hasAuthMethods}} try: {{#summary}} # {{{.}}} diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache index 565d00a3b9e9..ae7b8a697970 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache @@ -4,20 +4,15 @@ import time import {{{packageName}}} from pprint import pprint {{> python_doc_auth_partial}} -{{#hasAuthMethods}} -# Defining host is optional and default to {{{basePath}}} -configuration.host = "{{{basePath}}}" # Enter a context with an instance of the API client +{{#hasAuthMethods}} with {{{packageName}}}.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = {{{packageName}}}.{{{classname}}}(api_client) {{/hasAuthMethods}} {{^hasAuthMethods}} -# Enter a context with an instance of the API client -with {{{packageName}}}.ApiClient(configuration) as api_client: +with {{{packageName}}}.ApiClient() as api_client: +{{/hasAuthMethods}} # Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}(api_client) -{{/hasAuthMethods}} {{#requiredParams}}{{^defaultValue}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}} {{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} {{/optionalParams}} diff --git a/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache b/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache index 9f5b49f82147..d8cfc4ad11df 100644 --- a/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache +++ b/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache @@ -45,4 +45,7 @@ configuration.api_key['{{{keyParamName}}}'] = 'YOUR_API_KEY' configuration.access_token = 'YOUR_ACCESS_TOKEN' {{/isOAuth}} {{/authMethods}} + +# Defining host is optional and default to {{{basePath}}} +configuration.host = "{{{basePath}}}" {{/hasAuthMethods}} diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 9ea1aa2a6b18..d1d84afd1ce7 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md index 3ea79928f2ac..160851b5c31c 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index 45129d6d620e..5e9f9804ee00 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md index 285953422d22..360d7e01865e 100644 --- a/samples/client/petstore/python-asyncio/docs/StoreApi.md +++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md index cd0e35819a19..493dd47a4cf3 100644 --- a/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(api_client) body = petstore_api.Client() # client.Client | client model diff --git a/samples/client/petstore/python-experimental/docs/FakeApi.md b/samples/client/petstore/python-experimental/docs/FakeApi.md index bbe8aaccecdf..59b07dd05a0a 100644 --- a/samples/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/client/petstore/python-experimental/docs/FakeApi.md @@ -37,7 +37,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) xml_item = petstore_api.XmlItem() # xml_item.XmlItem | XmlItem Body @@ -92,7 +92,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = True # bool | Input boolean as post body (optional) @@ -148,7 +148,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) @@ -204,7 +204,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.OuterEnum("placed") # outer_enum.OuterEnum | Input enum as post body (optional) @@ -260,7 +260,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.OuterNumber(3.4) # outer_number.OuterNumber | Input number as post body (optional) @@ -316,7 +316,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = 'body_example' # str | Input string as post body (optional) @@ -372,7 +372,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | @@ -424,7 +424,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) query = 'query_example' # str | @@ -480,7 +480,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.Client() # client.Client | client model @@ -536,7 +536,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) @@ -599,6 +599,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -690,7 +691,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) @@ -761,7 +762,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) required_string_group = 56 # int | Required String in group parameters @@ -832,7 +833,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) param = {'key': 'param_example'} # {str: (str,)} | request body @@ -885,7 +886,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) param = 'param_example' # str | field1 diff --git a/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index 658e9ca6220f..1b5308a8199a 100644 --- a/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -30,6 +30,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-experimental/docs/PetApi.md b/samples/client/petstore/python-experimental/docs/PetApi.md index 8ff3853e3959..c7f69f794b5c 100644 --- a/samples/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/client/petstore/python-experimental/docs/PetApi.md @@ -34,6 +34,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -94,6 +95,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -166,6 +168,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -229,6 +232,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -294,6 +298,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -356,6 +361,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -418,6 +424,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -489,6 +496,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -564,6 +572,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-experimental/docs/StoreApi.md b/samples/client/petstore/python-experimental/docs/StoreApi.md index ed8692abf57a..efcc4a3ea287 100644 --- a/samples/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/client/petstore/python-experimental/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -89,6 +89,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -142,7 +143,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 56 # int | ID of pet that needs to be fetched @@ -198,7 +199,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) body = petstore_api.Order() # order.Order | order placed for purchasing the pet diff --git a/samples/client/petstore/python-experimental/docs/UserApi.md b/samples/client/petstore/python-experimental/docs/UserApi.md index 318a1b5827dd..4473840b5ce7 100644 --- a/samples/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/client/petstore/python-experimental/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) body = petstore_api.User() # user.User | Created user object @@ -83,7 +83,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) body = [petstore_api.User()] # [user.User] | List of user object @@ -136,7 +136,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) body = [petstore_api.User()] # [user.User] | List of user object @@ -191,7 +191,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be deleted @@ -245,7 +245,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -301,7 +301,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The user name for login @@ -358,7 +358,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) @@ -409,7 +409,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | name that need to be deleted diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index 9ea1aa2a6b18..d1d84afd1ce7 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md index 3ea79928f2ac..160851b5c31c 100644 --- a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index 45129d6d620e..5e9f9804ee00 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md index 285953422d22..360d7e01865e 100644 --- a/samples/client/petstore/python-tornado/docs/StoreApi.md +++ b/samples/client/petstore/python-tornado/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 9ea1aa2a6b18..d1d84afd1ce7 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md index 3ea79928f2ac..160851b5c31c 100644 --- a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 45129d6d620e..5e9f9804ee00 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md index 285953422d22..360d7e01865e 100644 --- a/samples/client/petstore/python/docs/StoreApi.md +++ b/samples/client/petstore/python/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md index 4c159f9f10c5..831230e18c65 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(api_client) client_client = petstore_api.Client() # client.Client | client model diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md index 17513301ccc8..080fe8bd98bb 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md @@ -21,7 +21,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.DefaultApi(api_client) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 3fd53419eb7d..c1146038a232 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -34,7 +34,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) @@ -86,7 +86,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = True # bool | Input boolean as post body (optional) @@ -142,7 +142,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) outer_composite_outer_composite = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) @@ -198,7 +198,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = 3.4 # float | Input number as post body (optional) @@ -254,7 +254,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = 'body_example' # str | Input string as post body (optional) @@ -310,7 +310,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) file_schema_test_class_file_schema_test_class = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | @@ -362,7 +362,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) query = 'query_example' # str | @@ -418,7 +418,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) client_client = petstore_api.Client() # client.Client | client model @@ -480,6 +480,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -571,7 +572,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) @@ -647,6 +648,7 @@ configuration.access_token = 'YOUR_BEARER_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -719,7 +721,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) request_body = {'key': 'request_body_example'} # {str: (str,)} | request body @@ -772,7 +774,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) param = 'param_example' # str | field1 @@ -829,7 +831,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) pipe = ['pipe_example'] # [str] | diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index 74d3bf84f757..a93336558a92 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -30,6 +30,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md index 1f8dddead6de..72f7fb27fc30 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md @@ -55,6 +55,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -114,6 +115,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -206,6 +208,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -290,6 +293,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -355,6 +359,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -438,6 +443,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -499,6 +505,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -570,6 +577,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -643,6 +651,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md index 8ef71bd8fc74..4372edd56540 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -89,6 +89,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -142,7 +143,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 56 # int | ID of pet that needs to be fetched @@ -198,7 +199,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_order = petstore_api.Order() # order.Order | order placed for purchasing the pet diff --git a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md index 720e4a41a461..70c5e1232ac7 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) user_user = petstore_api.User() # user.User | Created user object @@ -83,7 +83,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) user_user = [petstore_api.User()] # [user.User] | List of user object @@ -136,7 +136,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) user_user = [petstore_api.User()] # [user.User] | List of user object @@ -191,7 +191,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be deleted @@ -245,7 +245,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -301,7 +301,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The user name for login @@ -358,7 +358,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) @@ -409,7 +409,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | name that need to be deleted diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index c17ac031d413..e1b0e67d4230 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -477,6 +477,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -635,6 +636,7 @@ configuration.access_token = 'YOUR_BEARER_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md index 3606bdea3aa1..bf60f00c6a0d 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/openapi3/client/petstore/python/docs/PetApi.md b/samples/openapi3/client/petstore/python/docs/PetApi.md index 40d68d83cdba..eafac6a400de 100644 --- a/samples/openapi3/client/petstore/python/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -94,6 +95,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -157,6 +159,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -220,6 +223,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -285,6 +289,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -347,6 +352,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -408,6 +414,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -471,6 +478,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 @@ -535,6 +543,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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 diff --git a/samples/openapi3/client/petstore/python/docs/StoreApi.md b/samples/openapi3/client/petstore/python/docs/StoreApi.md index 5f5d3ef34118..9bfe9d95bf77 100644 --- a/samples/openapi3/client/petstore/python/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 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