From 25b0cbe2f13be83c45a7b7305298aa11315b6766 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Mon, 21 Dec 2020 17:14:18 +0800
Subject: [PATCH 01/28] Prepare 5.0.1 snapshot (#8249)

* update version to 5.0.1-SNAPSHOT

* update samples

* update meta codegen
---
 modules/openapi-generator-cli/pom.xml                           | 2 +-
 modules/openapi-generator-core/pom.xml                          | 2 +-
 modules/openapi-generator-gradle-plugin/gradle.properties       | 2 +-
 modules/openapi-generator-gradle-plugin/pom.xml                 | 2 +-
 modules/openapi-generator-maven-plugin/examples/java-client.xml | 2 +-
 .../examples/multi-module/java-client/pom.xml                   | 2 +-
 .../examples/non-java-invalid-spec.xml                          | 2 +-
 modules/openapi-generator-maven-plugin/examples/non-java.xml    | 2 +-
 modules/openapi-generator-maven-plugin/pom.xml                  | 2 +-
 modules/openapi-generator-online/pom.xml                        | 2 +-
 modules/openapi-generator/pom.xml                               | 2 +-
 pom.xml                                                         | 2 +-
 samples/client/petstore/R/.openapi-generator/VERSION            | 2 +-
 samples/client/petstore/apex/.openapi-generator/VERSION         | 2 +-
 samples/client/petstore/cpp-qt5/.openapi-generator/VERSION      | 2 +-
 .../petstore/cpp-restsdk/client/.openapi-generator/VERSION      | 2 +-
 samples/client/petstore/cpp-restsdk/client/ApiClient.cpp        | 2 +-
 samples/client/petstore/cpp-restsdk/client/ApiClient.h          | 2 +-
 samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp | 2 +-
 samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h   | 2 +-
 samples/client/petstore/cpp-restsdk/client/ApiException.cpp     | 2 +-
 samples/client/petstore/cpp-restsdk/client/ApiException.h       | 2 +-
 samples/client/petstore/cpp-restsdk/client/HttpContent.cpp      | 2 +-
 samples/client/petstore/cpp-restsdk/client/HttpContent.h        | 2 +-
 samples/client/petstore/cpp-restsdk/client/IHttpBody.h          | 2 +-
 samples/client/petstore/cpp-restsdk/client/JsonBody.cpp         | 2 +-
 samples/client/petstore/cpp-restsdk/client/JsonBody.h           | 2 +-
 samples/client/petstore/cpp-restsdk/client/ModelBase.cpp        | 2 +-
 samples/client/petstore/cpp-restsdk/client/ModelBase.h          | 2 +-
 .../client/petstore/cpp-restsdk/client/MultipartFormData.cpp    | 2 +-
 samples/client/petstore/cpp-restsdk/client/MultipartFormData.h  | 2 +-
 samples/client/petstore/cpp-restsdk/client/Object.cpp           | 2 +-
 samples/client/petstore/cpp-restsdk/client/Object.h             | 2 +-
 samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp       | 2 +-
 samples/client/petstore/cpp-restsdk/client/api/PetApi.h         | 2 +-
 samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp     | 2 +-
 samples/client/petstore/cpp-restsdk/client/api/StoreApi.h       | 2 +-
 samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp      | 2 +-
 samples/client/petstore/cpp-restsdk/client/api/UserApi.h        | 2 +-
 .../client/petstore/cpp-restsdk/client/model/ApiResponse.cpp    | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h  | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Category.cpp   | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Category.h     | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Order.cpp      | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Order.h        | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Pet.cpp        | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Pet.h          | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Tag.cpp        | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/Tag.h          | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/User.cpp       | 2 +-
 samples/client/petstore/cpp-restsdk/client/model/User.h         | 2 +-
 .../OpenAPIClient-net47/.openapi-generator/VERSION              | 2 +-
 .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION     | 2 +-
 .../csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION | 2 +-
 .../petstore/csharp/OpenAPIClient/.openapi-generator/VERSION    | 2 +-
 .../dart-dio/petstore_client_lib/.openapi-generator/VERSION     | 2 +-
 .../flutter_petstore/openapi/.openapi-generator/VERSION         | 2 +-
 .../flutter_proto_petstore/openapi/.openapi-generator/VERSION   | 2 +-
 .../petstore/dart-jaguar/openapi/.openapi-generator/VERSION     | 2 +-
 .../dart-jaguar/openapi_proto/.openapi-generator/VERSION        | 2 +-
 .../dart2/petstore_client_lib/.openapi-generator/VERSION        | 2 +-
 samples/client/petstore/elixir/.openapi-generator/VERSION       | 2 +-
 .../client/petstore/go/go-petstore/.openapi-generator/VERSION   | 2 +-
 samples/client/petstore/groovy/.openapi-generator/VERSION       | 2 +-
 .../petstore/haskell-http-client/.openapi-generator/VERSION     | 2 +-
 .../petstore/java/feign-no-nullable/.openapi-generator/VERSION  | 2 +-
 samples/client/petstore/java/feign/.openapi-generator/VERSION   | 2 +-
 .../petstore/java/google-api-client/.openapi-generator/VERSION  | 2 +-
 samples/client/petstore/java/jersey1/.openapi-generator/VERSION | 2 +-
 .../petstore/java/jersey2-java8/.openapi-generator/VERSION      | 2 +-
 .../java/microprofile-rest-client/.openapi-generator/VERSION    | 2 +-
 .../petstore/java/native-async/.openapi-generator/VERSION       | 2 +-
 samples/client/petstore/java/native/.openapi-generator/VERSION  | 2 +-
 .../okhttp-gson-dynamicOperations/.openapi-generator/VERSION    | 2 +-
 .../java/okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +-
 .../client/petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +-
 .../java/rest-assured-jackson/.openapi-generator/VERSION        | 2 +-
 .../petstore/java/rest-assured/.openapi-generator/VERSION       | 2 +-
 .../client/petstore/java/resteasy/.openapi-generator/VERSION    | 2 +-
 .../java/resttemplate-withXml/.openapi-generator/VERSION        | 2 +-
 .../petstore/java/resttemplate/.openapi-generator/VERSION       | 2 +-
 .../petstore/java/retrofit2-play26/.openapi-generator/VERSION   | 2 +-
 .../client/petstore/java/retrofit2/.openapi-generator/VERSION   | 2 +-
 .../petstore/java/retrofit2rx2/.openapi-generator/VERSION       | 2 +-
 .../petstore/java/retrofit2rx3/.openapi-generator/VERSION       | 2 +-
 .../petstore/java/vertx-no-nullable/.openapi-generator/VERSION  | 2 +-
 samples/client/petstore/java/vertx/.openapi-generator/VERSION   | 2 +-
 .../client/petstore/java/webclient/.openapi-generator/VERSION   | 2 +-
 .../client/petstore/javascript-es6/.openapi-generator/VERSION   | 2 +-
 .../petstore/javascript-promise-es6/.openapi-generator/VERSION  | 2 +-
 samples/client/petstore/kotlin-gson/.openapi-generator/VERSION  | 2 +-
 .../client/petstore/kotlin-jackson/.openapi-generator/VERSION   | 2 +-
 .../kotlin-json-request-string/.openapi-generator/VERSION       | 2 +-
 .../kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION    | 2 +-
 .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION    | 2 +-
 .../petstore/kotlin-multiplatform/.openapi-generator/VERSION    | 2 +-
 .../client/petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +-
 .../client/petstore/kotlin-nullable/.openapi-generator/VERSION  | 2 +-
 .../client/petstore/kotlin-okhttp3/.openapi-generator/VERSION   | 2 +-
 .../petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION    | 2 +-
 .../client/petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +-
 .../client/petstore/kotlin-string/.openapi-generator/VERSION    | 2 +-
 .../petstore/kotlin-threetenbp/.openapi-generator/VERSION       | 2 +-
 samples/client/petstore/kotlin/.openapi-generator/VERSION       | 2 +-
 samples/client/petstore/lua/.openapi-generator/VERSION          | 2 +-
 samples/client/petstore/nim/.openapi-generator/VERSION          | 2 +-
 .../client/petstore/objc/core-data/.openapi-generator/VERSION   | 2 +-
 samples/client/petstore/objc/default/.openapi-generator/VERSION | 2 +-
 samples/client/petstore/perl/.openapi-generator/VERSION         | 2 +-
 .../petstore/php/OpenAPIClient-php/.openapi-generator/VERSION   | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php   | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php       | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php   | 2 +-
 .../php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php   | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php    | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php  | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php   | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/ApiException.php  | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php       | 2 +-
 .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php   | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php  | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php    | 2 +-
 .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php    | 2 +-
 .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php       | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php      | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +-
 samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php       | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/Category.php       | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php     | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/Client.php  | 2 +-
 samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php       | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php     | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php      | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php       | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php    | 2 +-
 .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php     | 2 +-
 samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php     | 2 +-
 .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php         | 2 +-
 .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php       | 2 +-
 .../php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php   | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +-
 .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php   | 2 +-
 .../php/OpenAPIClient-php/lib/Model/Model200Response.php        | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php      | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php    | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php    | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php  | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php     | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php   | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php      | 2 +-
 .../php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php   | 2 +-
 .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php        | 2 +-
 .../lib/Model/OuterEnumIntegerDefaultValue.php                  | 2 +-
 samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php  | 2 +-
 .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php        | 2 +-
 samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +-
 .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php    | 2 +-
 .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php     | 2 +-
 samples/client/petstore/powershell/.openapi-generator/VERSION   | 2 +-
 .../client/petstore/python-asyncio/.openapi-generator/VERSION   | 2 +-
 .../client/petstore/python-legacy/.openapi-generator/VERSION    | 2 +-
 .../client/petstore/python-tornado/.openapi-generator/VERSION   | 2 +-
 samples/client/petstore/python/.openapi-generator/VERSION       | 2 +-
 samples/client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore.rb            | 2 +-
 .../petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb  | 2 +-
 .../petstore/ruby-faraday/lib/petstore/api/default_api.rb       | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb   | 2 +-
 .../ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb    | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/api/store_api.rb  | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/api/user_api.rb   | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb  | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/configuration.rb  | 2 +-
 .../lib/petstore/models/additional_properties_class.rb          | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/animal.rb  | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/api_response.rb   | 2 +-
 .../lib/petstore/models/array_of_array_of_number_only.rb        | 2 +-
 .../ruby-faraday/lib/petstore/models/array_of_number_only.rb    | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/array_test.rb     | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/capitalization.rb | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb     | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/category.rb       | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/class_model.rb    | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/client.rb  | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb     | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb    | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb     | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb      | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/file.rb    | 2 +-
 .../ruby-faraday/lib/petstore/models/file_schema_test_class.rb  | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/format_test.rb    | 2 +-
 .../ruby-faraday/lib/petstore/models/has_only_read_only.rb      | 2 +-
 .../ruby-faraday/lib/petstore/models/health_check_result.rb     | 2 +-
 .../ruby-faraday/lib/petstore/models/inline_response_default.rb | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/list.rb    | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/map_test.rb       | 2 +-
 .../models/mixed_properties_and_additional_properties_class.rb  | 2 +-
 .../ruby-faraday/lib/petstore/models/model200_response.rb       | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/model_return.rb   | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/name.rb    | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/nullable_class.rb | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/number_only.rb    | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/order.rb   | 2 +-
 .../ruby-faraday/lib/petstore/models/outer_composite.rb         | 2 +-
 .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb     | 2 +-
 .../lib/petstore/models/outer_enum_default_value.rb             | 2 +-
 .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb      | 2 +-
 .../lib/petstore/models/outer_enum_integer_default_value.rb     | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 2 +-
 .../ruby-faraday/lib/petstore/models/read_only_first.rb         | 2 +-
 .../ruby-faraday/lib/petstore/models/special_model_name.rb      | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +-
 .../client/petstore/ruby-faraday/lib/petstore/models/user.rb    | 2 +-
 samples/client/petstore/ruby-faraday/lib/petstore/version.rb    | 2 +-
 samples/client/petstore/ruby-faraday/petstore.gemspec           | 2 +-
 samples/client/petstore/ruby-faraday/spec/api_client_spec.rb    | 2 +-
 samples/client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +-
 samples/client/petstore/ruby-faraday/spec/spec_helper.rb        | 2 +-
 samples/client/petstore/ruby/.openapi-generator/VERSION         | 2 +-
 samples/client/petstore/ruby/lib/petstore.rb                    | 2 +-
 .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb   | 2 +-
 samples/client/petstore/ruby/lib/petstore/api/default_api.rb    | 2 +-
 samples/client/petstore/ruby/lib/petstore/api/fake_api.rb       | 2 +-
 .../ruby/lib/petstore/api/fake_classname_tags123_api.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/api/pet_api.rb        | 2 +-
 samples/client/petstore/ruby/lib/petstore/api/store_api.rb      | 2 +-
 samples/client/petstore/ruby/lib/petstore/api/user_api.rb       | 2 +-
 samples/client/petstore/ruby/lib/petstore/api_client.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/api_error.rb          | 2 +-
 samples/client/petstore/ruby/lib/petstore/configuration.rb      | 2 +-
 .../ruby/lib/petstore/models/additional_properties_class.rb     | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/animal.rb      | 2 +-
 .../client/petstore/ruby/lib/petstore/models/api_response.rb    | 2 +-
 .../ruby/lib/petstore/models/array_of_array_of_number_only.rb   | 2 +-
 .../petstore/ruby/lib/petstore/models/array_of_number_only.rb   | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/array_test.rb  | 2 +-
 .../client/petstore/ruby/lib/petstore/models/capitalization.rb  | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/cat.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb  | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/category.rb    | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/client.rb      | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/dog.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb  | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/enum_class.rb  | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/enum_test.rb   | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/file.rb        | 2 +-
 .../petstore/ruby/lib/petstore/models/file_schema_test_class.rb | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/foo.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +-
 .../petstore/ruby/lib/petstore/models/has_only_read_only.rb     | 2 +-
 .../petstore/ruby/lib/petstore/models/health_check_result.rb    | 2 +-
 .../ruby/lib/petstore/models/inline_response_default.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/list.rb        | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/map_test.rb    | 2 +-
 .../models/mixed_properties_and_additional_properties_class.rb  | 2 +-
 .../petstore/ruby/lib/petstore/models/model200_response.rb      | 2 +-
 .../client/petstore/ruby/lib/petstore/models/model_return.rb    | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/name.rb        | 2 +-
 .../client/petstore/ruby/lib/petstore/models/nullable_class.rb  | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/order.rb       | 2 +-
 .../client/petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb  | 2 +-
 .../ruby/lib/petstore/models/outer_enum_default_value.rb        | 2 +-
 .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb     | 2 +-
 .../lib/petstore/models/outer_enum_integer_default_value.rb     | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/pet.rb         | 2 +-
 .../client/petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +-
 .../petstore/ruby/lib/petstore/models/special_model_name.rb     | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/tag.rb         | 2 +-
 samples/client/petstore/ruby/lib/petstore/models/user.rb        | 2 +-
 samples/client/petstore/ruby/lib/petstore/version.rb            | 2 +-
 samples/client/petstore/ruby/petstore.gemspec                   | 2 +-
 samples/client/petstore/ruby/spec/api_client_spec.rb            | 2 +-
 samples/client/petstore/ruby/spec/configuration_spec.rb         | 2 +-
 samples/client/petstore/ruby/spec/spec_helper.rb                | 2 +-
 .../petstore/rust/hyper/petstore/.openapi-generator/VERSION     | 2 +-
 .../rust/reqwest/petstore-async/.openapi-generator/VERSION      | 2 +-
 .../petstore/rust/reqwest/petstore/.openapi-generator/VERSION   | 2 +-
 samples/client/petstore/scala-akka/.openapi-generator/VERSION   | 2 +-
 samples/client/petstore/scala-sttp/.openapi-generator/VERSION   | 2 +-
 .../petstore/spring-cloud-async/.openapi-generator/VERSION      | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../spring-cloud-no-nullable/.openapi-generator/VERSION         | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../spring-cloud-spring-pageable/.openapi-generator/VERSION     | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 samples/client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +-
 .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 samples/client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +-
 .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/single-request-parameter/.openapi-generator/VERSION  | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../builds/with-prefixed-module-name/.openapi-generator/VERSION | 2 +-
 .../builds/default/.openapi-generator/VERSION                   | 2 +-
 .../builds/with-npm/.openapi-generator/VERSION                  | 2 +-
 .../typescript-aurelia/default/.openapi-generator/VERSION       | 2 +-
 .../builds/composed-schemas/.openapi-generator/VERSION          | 2 +-
 .../typescript-axios/builds/default/.openapi-generator/VERSION  | 2 +-
 .../builds/es6-target/.openapi-generator/VERSION                | 2 +-
 .../builds/with-complex-headers/.openapi-generator/VERSION      | 2 +-
 .../builds/with-interfaces/.openapi-generator/VERSION           | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../builds/with-npm-version/.openapi-generator/VERSION          | 2 +-
 .../with-single-request-parameters/.openapi-generator/VERSION   | 2 +-
 .../builds/default-v3.0/.openapi-generator/VERSION              | 2 +-
 .../typescript-fetch/builds/default/.openapi-generator/VERSION  | 2 +-
 .../typescript-fetch/builds/enum/.openapi-generator/VERSION     | 2 +-
 .../builds/es6-target/.openapi-generator/VERSION                | 2 +-
 .../builds/multiple-parameters/.openapi-generator/VERSION       | 2 +-
 .../prefix-parameter-interfaces/.openapi-generator/VERSION      | 2 +-
 .../builds/typescript-three-plus/.openapi-generator/VERSION     | 2 +-
 .../builds/with-interfaces/.openapi-generator/VERSION           | 2 +-
 .../builds/with-npm-version/.openapi-generator/VERSION          | 2 +-
 .../builds/without-runtime-checks/.openapi-generator/VERSION    | 2 +-
 .../petstore/typescript-inversify/.openapi-generator/VERSION    | 2 +-
 .../typescript-jquery/default/.openapi-generator/VERSION        | 2 +-
 .../petstore/typescript-jquery/npm/.openapi-generator/VERSION   | 2 +-
 .../petstore/typescript-node/default/.openapi-generator/VERSION | 2 +-
 .../petstore/typescript-node/npm/.openapi-generator/VERSION     | 2 +-
 .../builds/with-npm-version/.openapi-generator/VERSION          | 2 +-
 .../typescript-rxjs/builds/default/.openapi-generator/VERSION   | 2 +-
 .../builds/es6-target/.openapi-generator/VERSION                | 2 +-
 .../builds/with-npm-version/.openapi-generator/VERSION          | 2 +-
 .../builds/with-progress-subscriber/.openapi-generator/VERSION  | 2 +-
 .../config/petstore/protobuf-schema/.openapi-generator/VERSION  | 2 +-
 samples/meta-codegen/lib/pom.xml                                | 2 +-
 samples/meta-codegen/usage/.openapi-generator/VERSION           | 2 +-
 samples/openapi3/client/elm/.openapi-generator/VERSION          | 2 +-
 .../x-auth-id-alias/go-experimental/.openapi-generator/VERSION  | 2 +-
 .../java/jersey2-java8/.openapi-generator/VERSION               | 2 +-
 .../x-auth-id-alias/python/.openapi-generator/VERSION           | 2 +-
 .../features/dynamic-servers/python/.openapi-generator/VERSION  | 2 +-
 .../features/dynamic-servers/ruby/.openapi-generator/VERSION    | 2 +-
 .../features/dynamic-servers/ruby/dynamic_servers.gemspec       | 2 +-
 .../client/features/dynamic-servers/ruby/lib/dynamic_servers.rb | 2 +-
 .../dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb   | 2 +-
 .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb      | 2 +-
 .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb       | 2 +-
 .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb   | 2 +-
 .../dynamic-servers/ruby/lib/dynamic_servers/version.rb         | 2 +-
 .../features/dynamic-servers/ruby/spec/api_client_spec.rb       | 2 +-
 .../features/dynamic-servers/ruby/spec/configuration_spec.rb    | 2 +-
 .../client/features/dynamic-servers/ruby/spec/spec_helper.rb    | 2 +-
 .../ruby-client/.openapi-generator/VERSION                      | 2 +-
 .../generate-alias-as-model/ruby-client/lib/petstore.rb         | 2 +-
 .../ruby-client/lib/petstore/api/usage_api.rb                   | 2 +-
 .../ruby-client/lib/petstore/api_client.rb                      | 2 +-
 .../ruby-client/lib/petstore/api_error.rb                       | 2 +-
 .../ruby-client/lib/petstore/configuration.rb                   | 2 +-
 .../ruby-client/lib/petstore/models/array_alias.rb              | 2 +-
 .../ruby-client/lib/petstore/models/map_alias.rb                | 2 +-
 .../generate-alias-as-model/ruby-client/lib/petstore/version.rb | 2 +-
 .../generate-alias-as-model/ruby-client/petstore.gemspec        | 2 +-
 .../generate-alias-as-model/ruby-client/spec/api_client_spec.rb | 2 +-
 .../ruby-client/spec/configuration_spec.rb                      | 2 +-
 .../generate-alias-as-model/ruby-client/spec/spec_helper.rb     | 2 +-
 .../dart-dio/petstore_client_lib/.openapi-generator/VERSION     | 2 +-
 .../petstore_client_lib_fake/.openapi-generator/VERSION         | 2 +-
 .../dart2/petstore_client_lib/.openapi-generator/VERSION        | 2 +-
 .../dart2/petstore_client_lib_fake/.openapi-generator/VERSION   | 2 +-
 .../client/petstore/go/go-petstore/.openapi-generator/VERSION   | 2 +-
 .../jersey2-java8-special-characters/.openapi-generator/VERSION | 2 +-
 .../petstore/java/jersey2-java8/.openapi-generator/VERSION      | 2 +-
 .../client/petstore/java/native/.openapi-generator/VERSION      | 2 +-
 .../client/petstore/python-legacy/.openapi-generator/VERSION    | 2 +-
 .../openapi3/client/petstore/python/.openapi-generator/VERSION  | 2 +-
 .../typescript/builds/default/.openapi-generator/VERSION        | 2 +-
 .../petstore/typescript/builds/deno/.openapi-generator/VERSION  | 2 +-
 .../typescript/builds/inversify/.openapi-generator/VERSION      | 2 +-
 .../typescript/builds/jquery/.openapi-generator/VERSION         | 2 +-
 .../typescript/builds/object_params/.openapi-generator/VERSION  | 2 +-
 samples/schema/petstore/mysql/.openapi-generator/VERSION        | 2 +-
 .../server/petstore/aspnetcore-3.0/.openapi-generator/VERSION   | 2 +-
 .../server/petstore/aspnetcore-3.1/.openapi-generator/VERSION   | 2 +-
 samples/server/petstore/aspnetcore/.openapi-generator/VERSION   | 2 +-
 .../cpp-qt5-qhttpengine-server/.openapi-generator/VERSION       | 2 +-
 .../server/petstore/go-api-server/.openapi-generator/VERSION    | 2 +-
 .../petstore/go-gin-api-server/.openapi-generator/VERSION       | 2 +-
 samples/server/petstore/java-msf4j/.openapi-generator/VERSION   | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../java-play-framework-async/.openapi-generator/VERSION        | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../java-play-framework-no-interface/.openapi-generator/VERSION | 2 +-
 .../java-play-framework-no-nullable/.openapi-generator/VERSION  | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../petstore/java-play-framework/.openapi-generator/VERSION     | 2 +-
 .../jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION    | 2 +-
 .../server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION    | 2 +-
 .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION         | 2 +-
 samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION    | 2 +-
 .../server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +-
 samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +-
 .../petstore/jaxrs-resteasy/default/.openapi-generator/VERSION  | 2 +-
 .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION         | 2 +-
 .../petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +-
 .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION      | 2 +-
 .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION     | 2 +-
 .../petstore/jaxrs-spec-interface/.openapi-generator/VERSION    | 2 +-
 samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION   | 2 +-
 .../petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION   | 2 +-
 .../server/petstore/jaxrs/jersey1/.openapi-generator/VERSION    | 2 +-
 .../petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION   | 2 +-
 .../server/petstore/jaxrs/jersey2/.openapi-generator/VERSION    | 2 +-
 .../petstore/kotlin-server/ktor/.openapi-generator/VERSION      | 2 +-
 samples/server/petstore/kotlin-server/ktor/README.md            | 2 +-
 .../kotlin-springboot-delegate/.openapi-generator/VERSION       | 2 +-
 .../src/main/kotlin/org/openapitools/api/PetApi.kt              | 2 +-
 .../src/main/kotlin/org/openapitools/api/StoreApi.kt            | 2 +-
 .../src/main/kotlin/org/openapitools/api/UserApi.kt             | 2 +-
 .../kotlin-springboot-reactive/.openapi-generator/VERSION       | 2 +-
 .../petstore/kotlin-springboot/.openapi-generator/VERSION       | 2 +-
 samples/server/petstore/php-laravel/.openapi-generator/VERSION  | 2 +-
 samples/server/petstore/php-lumen/.openapi-generator/VERSION    | 2 +-
 .../server/petstore/php-mezzio-ph/.openapi-generator/VERSION    | 2 +-
 samples/server/petstore/php-slim4/.openapi-generator/VERSION    | 2 +-
 .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION    | 2 +-
 .../python-aiohttp-srclayout/.openapi-generator/VERSION         | 2 +-
 .../server/petstore/python-aiohttp/.openapi-generator/VERSION   | 2 +-
 .../petstore/python-blueplanet/.openapi-generator/VERSION       | 2 +-
 samples/server/petstore/python-flask/.openapi-generator/VERSION | 2 +-
 .../rust-server/output/multipart-v3/.openapi-generator/VERSION  | 2 +-
 .../rust-server/output/no-example-v3/.openapi-generator/VERSION | 2 +-
 .../rust-server/output/openapi-v3/.openapi-generator/VERSION    | 2 +-
 .../rust-server/output/ops-v3/.openapi-generator/VERSION        | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../output/rust-server-test/.openapi-generator/VERSION          | 2 +-
 .../petstore/spring-mvc-j8-async/.openapi-generator/VERSION     | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../spring-mvc-j8-localdatetime/.openapi-generator/VERSION      | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../petstore/spring-mvc-no-nullable/.openapi-generator/VERSION  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../spring-mvc-spring-pageable/.openapi-generator/VERSION       | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 samples/server/petstore/spring-mvc/.openapi-generator/VERSION   | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../spring-mvc/src/main/java/org/openapitools/api/FakeApi.java  | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../spring-mvc/src/main/java/org/openapitools/api/PetApi.java   | 2 +-
 .../spring-mvc/src/main/java/org/openapitools/api/StoreApi.java | 2 +-
 .../spring-mvc/src/main/java/org/openapitools/api/UserApi.java  | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../springboot-beanvalidation/.openapi-generator/VERSION        | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../petstore/springboot-delegate-j8/.openapi-generator/VERSION  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../petstore/springboot-delegate/.openapi-generator/VERSION     | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../springboot-implicitHeaders/.openapi-generator/VERSION       | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../petstore/springboot-reactive/.openapi-generator/VERSION     | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../.openapi-generator/VERSION                                  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../springboot-spring-pageable/.openapi-generator/VERSION       | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../petstore/springboot-useoptional/.openapi-generator/VERSION  | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../src/main/java/org/openapitools/api/FakeApi.java             | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/api/PetApi.java              | 2 +-
 .../src/main/java/org/openapitools/api/StoreApi.java            | 2 +-
 .../src/main/java/org/openapitools/api/UserApi.java             | 2 +-
 .../petstore/springboot-virtualan/.openapi-generator/VERSION    | 2 +-
 .../java/org/openapitools/virtualan/api/AnotherFakeApi.java     | 2 +-
 .../src/main/java/org/openapitools/virtualan/api/FakeApi.java   | 2 +-
 .../org/openapitools/virtualan/api/FakeClassnameTestApi.java    | 2 +-
 .../src/main/java/org/openapitools/virtualan/api/PetApi.java    | 2 +-
 .../src/main/java/org/openapitools/virtualan/api/StoreApi.java  | 2 +-
 .../src/main/java/org/openapitools/virtualan/api/UserApi.java   | 2 +-
 samples/server/petstore/springboot/.openapi-generator/VERSION   | 2 +-
 .../src/main/java/org/openapitools/api/AnotherFakeApi.java      | 2 +-
 .../springboot/src/main/java/org/openapitools/api/FakeApi.java  | 2 +-
 .../main/java/org/openapitools/api/FakeClassnameTestApi.java    | 2 +-
 .../springboot/src/main/java/org/openapitools/api/PetApi.java   | 2 +-
 .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +-
 .../springboot/src/main/java/org/openapitools/api/UserApi.java  | 2 +-
 593 files changed, 593 insertions(+), 593 deletions(-)

diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml
index fe3ebb4d521..e359fbf3112 100644
--- a/modules/openapi-generator-cli/pom.xml
+++ b/modules/openapi-generator-cli/pom.xml
@@ -4,7 +4,7 @@
         <groupId>org.openapitools</groupId>
         <artifactId>openapi-generator-project</artifactId>
         <!-- RELEASE_VERSION -->
-        <version>5.0.0</version>
+        <version>5.0.1-SNAPSHOT</version>
         <!-- /RELEASE_VERSION -->
         <relativePath>../..</relativePath>
     </parent>
diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml
index 1e455032c0c..f41fc23667d 100644
--- a/modules/openapi-generator-core/pom.xml
+++ b/modules/openapi-generator-core/pom.xml
@@ -6,7 +6,7 @@
     <artifactId>openapi-generator-project</artifactId>
     <groupId>org.openapitools</groupId>
     <!-- RELEASE_VERSION -->
-    <version>5.0.0</version>
+    <version>5.0.1-SNAPSHOT</version>
     <!-- /RELEASE_VERSION -->
     <relativePath>../..</relativePath>
   </parent>
diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties
index cb2aeda07a3..8632e3781e9 100644
--- a/modules/openapi-generator-gradle-plugin/gradle.properties
+++ b/modules/openapi-generator-gradle-plugin/gradle.properties
@@ -1,5 +1,5 @@
 # RELEASE_VERSION
-openApiGeneratorVersion=5.0.0
+openApiGeneratorVersion=5.0.1-SNAPSHOT
 # /RELEASE_VERSION
 
 # BEGIN placeholders
diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml
index 3258af64ff4..03f2765b7f6 100644
--- a/modules/openapi-generator-gradle-plugin/pom.xml
+++ b/modules/openapi-generator-gradle-plugin/pom.xml
@@ -4,7 +4,7 @@
         <groupId>org.openapitools</groupId>
         <artifactId>openapi-generator-project</artifactId>
         <!-- RELEASE_VERSION -->
-        <version>5.0.0</version>
+        <version>5.0.1-SNAPSHOT</version>
         <!-- /RELEASE_VERSION -->
         <relativePath>../..</relativePath>
     </parent>
diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml
index 63d92e385ad..93d4ae6d472 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 @@
                 <groupId>org.openapitools</groupId>
                 <artifactId>openapi-generator-maven-plugin</artifactId>
                 <!-- RELEASE_VERSION -->
-                <version>5.0.0</version>
+                <version>5.0.1-SNAPSHOT</version>
                 <!-- /RELEASE_VERSION -->
                 <executions>
                     <execution>
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 5ec66f131fb..e3b0f025332 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 @@
                 <groupId>org.openapitools</groupId>
                 <artifactId>openapi-generator-maven-plugin</artifactId>
                 <!-- RELEASE_VERSION -->
-                <version>5.0.0</version>
+                <version>5.0.1-SNAPSHOT</version>
                 <!-- /RELEASE_VERSION -->
                 <dependencies>
                     <dependency>
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 670d250dd39..8c847c800a3 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 @@
                 <groupId>org.openapitools</groupId>
                 <artifactId>openapi-generator-maven-plugin</artifactId>
                 <!-- RELEASE_VERSION -->
-                <version>5.0.0</version>
+                <version>5.0.1-SNAPSHOT</version>
                 <!-- /RELEASE_VERSION -->
                 <executions>
                     <execution>
diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml
index 373de4c8c09..7305e7f995c 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 @@
                 <groupId>org.openapitools</groupId>
                 <artifactId>openapi-generator-maven-plugin</artifactId>
                 <!-- RELEASE_VERSION -->
-                <version>5.0.0</version>
+                <version>5.0.1-SNAPSHOT</version>
                 <!-- /RELEASE_VERSION -->
                 <executions>
                     <execution>
diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml
index 0c442861ce3..db0dd86d083 100644
--- a/modules/openapi-generator-maven-plugin/pom.xml
+++ b/modules/openapi-generator-maven-plugin/pom.xml
@@ -5,7 +5,7 @@
         <groupId>org.openapitools</groupId>
         <artifactId>openapi-generator-project</artifactId>
         <!-- RELEASE_VERSION -->
-        <version>5.0.0</version>
+        <version>5.0.1-SNAPSHOT</version>
         <!-- /RELEASE_VERSION -->
         <relativePath>../..</relativePath>
     </parent>
diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml
index 62581d3d8fd..3083774963c 100644
--- a/modules/openapi-generator-online/pom.xml
+++ b/modules/openapi-generator-online/pom.xml
@@ -4,7 +4,7 @@
         <groupId>org.openapitools</groupId>
         <artifactId>openapi-generator-project</artifactId>
         <!-- RELEASE_VERSION -->
-        <version>5.0.0</version>
+        <version>5.0.1-SNAPSHOT</version>
         <!-- /RELEASE_VERSION -->
         <relativePath>../..</relativePath>
     </parent>
diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml
index 36ce4b53cd2..ba2396b7893 100644
--- a/modules/openapi-generator/pom.xml
+++ b/modules/openapi-generator/pom.xml
@@ -4,7 +4,7 @@
         <groupId>org.openapitools</groupId>
         <artifactId>openapi-generator-project</artifactId>
         <!-- RELEASE_VERSION -->
-        <version>5.0.0</version>
+        <version>5.0.1-SNAPSHOT</version>
         <!-- /RELEASE_VERSION -->
         <relativePath>../..</relativePath>
     </parent>
diff --git a/pom.xml b/pom.xml
index 9a6b684cc25..defb35d7add 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
     <packaging>pom</packaging>
     <name>openapi-generator-project</name>
     <!-- RELEASE_VERSION -->
-    <version>5.0.0</version>
+    <version>5.0.1-SNAPSHOT</version>
     <!-- /RELEASE_VERSION -->
     <url>https://github.com/openapitools/openapi-generator</url>
     <scm>
diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/R/.openapi-generator/VERSION
+++ b/samples/client/petstore/R/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/apex/.openapi-generator/VERSION
+++ b/samples/client/petstore/apex/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
index a42bd11e5f0..574f7fb2aad 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h
index 813d5796595..a918ff8fb6a 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
index 9f283f5bb46..4033ed07297 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
index 959ce3b8998..b47aaebf538 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
index 4db8b7ccc1e..cb82cf54de1 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h
index 7210e09620b..2e28dcb54df 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiException.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
index e071f759b7f..86c86df8ff9 100644
--- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h
index 804178ca0f6..7f3614fe660 100644
--- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h
+++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
index 64ca13f1f73..d62f5df1ae5 100644
--- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
+++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
index fe10329775d..9c11d4482be 100644
--- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h
index f5b70b8ae3c..29e913017a9 100644
--- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h
+++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
index 8251b045aec..cdd00421c97 100644
--- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h
index 5277bec3dde..9399698b9d2 100644
--- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h
+++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
index 3c94c6b6848..e63f733991a 100644
--- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
index d40b8c49beb..e8ec78267b6 100644
--- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
+++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp
index 50e438308c0..09d74600232 100644
--- a/samples/client/petstore/cpp-restsdk/client/Object.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h
index fcc0826c380..49696839cec 100644
--- a/samples/client/petstore/cpp-restsdk/client/Object.h
+++ b/samples/client/petstore/cpp-restsdk/client/Object.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
index c8bea4ce1ec..7fe2491320a 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
index a44a88851fc..0ae848804da 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
index 5e8915cac49..76c8c9a5be9 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
index 5e1f3d6d0de..ce51ba4e2b8 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
index 991c6aad75b..3e66b54b8f4 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
index 105eaea1d65..b10d7f78934 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
index 8634d874328..c0de8a1d1a6 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
index 9c15d576114..dcbfbf3b1ce 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
index 4bffbdc5287..8e2e7bf009b 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h
index 3f072d64cd3..080a8c52692 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Category.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
index fa6e91372fa..dffcf98ab09 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h
index a48148bc42c..524c5157042 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Order.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
index dd5fc140b35..0f8aeb29448 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h
index ec0648d0807..d41199897d2 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
index c22a0267047..2f6b6b18e45 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h
index ff0e5467238..cde78c44719 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp
index b37b01a0389..041436f9447 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h
index 7ee2061cc63..b22509e4cfa 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/User.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/User.h
@@ -4,7 +4,7 @@
  *
  * The version of the OpenAPI document: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 5.0.0.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/elixir/.openapi-generator/VERSION
+++ b/samples/client/petstore/elixir/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/groovy/.openapi-generator/VERSION
+++ b/samples/client/petstore/groovy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/feign/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/native/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/native/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/kotlin/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/lua/.openapi-generator/VERSION
+++ b/samples/client/petstore/lua/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/nim/.openapi-generator/VERSION
+++ b/samples/client/petstore/nim/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION
+++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/objc/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/perl/.openapi-generator/VERSION
+++ b/samples/client/petstore/perl/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION
+++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 23b2da67c34..3ca58770e80 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php
index cd2309da18f..965bf4c67ce 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 bd6650a6f1a..36ac8c380ca 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 0f7892e6cc5..7a17eafddf2 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 803fff388ab..7270ba1bcdb 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 e4c1f169ddb..b3ed61437d3 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 dc150a8bc2e..6be54e1a2d7 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php
index a5bfaec096a..b2e49b47ee3 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php
index c2a1de88e31..a22322e7b03 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php
index 1385718b506..73fb1c179af 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php
@@ -17,7 +17,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 495aa85b031..b9fd22b198d 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 88c046728a9..c74cec66c60 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 aeba7ef4790..ef8946cdd6c 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 339d7df761b..ee28c54f20a 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 a6b2e5ccd43..54a64883536 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 e339d82c17a..15cff363af1 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 b6b692b43f6..2738ca6a74c 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 5dc9cb03381..f66748c5b5c 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 2b686389278..d806f479792 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 c12f5f49bb7..cf5024314f1 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 f74cedd8f07..5d33f01bdb7 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 6842d8c0cd8..21dff0b6094 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 f08750c2f5c..847adc92975 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 e9c9be9599a..42587602234 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 15e761584af..147e7351087 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 929f16435f3..5b809645689 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 ccfc0c7fc3b..2eda1174da4 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 762abcc1533..92eec4875a8 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 20cde9555bd..d623394585b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
index 06ba0c54d6d..afd08cb1123 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 99679c41151..0b093c1fd53 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 fc3fecdea19..59136120120 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php
index 06631d2841f..476297da8c0 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php
index 04a87a98225..dfc438879de 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 ba1d9e2757f..fc93c85398c 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 454404d5e2f..fc90fe8d0cc 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 23b80c313ac..6674caaae70 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 f27ea9de78b..f4dcd429423 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 251090be903..8edb8267bf6 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 7e0275c8bda..be01082ff63 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 361991d49b1..755307f39a6 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php
index 46a5eb0d30f..c91c11d8b95 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 bd7e3dccc99..31072135dc2 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 a69c1af2f3c..5a00ee88322 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 edb22a89ad7..9bef0c0496c 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 c6aedbf67df..275200558d4 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php
index 39bc8885377..696e4bbb47e 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php
index 2e5c81e9d7b..31408d1ab31 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
index 946932a1756..a9a2cb21108 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 6e839da6beb..4bbf610db3c 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 f714596228e..c1f6b21e8eb 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 bf624d62946..a5e4e0764b3 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 5483a03b0bd..aa7d543ecc5 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-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 6299a869d6e..f0eecf6bb8f 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php
index 41080eb7b46..9419b635d59 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php
@@ -18,7 +18,7 @@
  * The version of the OpenAPI document: 1.0.0
  * 
  * Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.0.0
+ * OpenAPI Generator version: 5.0.1-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/powershell/.openapi-generator/VERSION
+++ b/samples/client/petstore/powershell/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION
+++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION
+++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION
+++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/python/.openapi-generator/VERSION
+++ b/samples/client/petstore/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION
+++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 4955ed5ca04..d12ff44e87c 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 2995f4f218f..4c129aefd96 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb
index 088bd19e111..a6641555bc2 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 ca5a5866fd0..d1bf3ebee82 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 0edcf47e87c..0a69ee66dbe 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 ddbdb38aa05..2fb35fe0f29 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 331b919569f..4ac33ff4a45 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 e49f1e32675..6bc639a1d8b 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 938ce450593..f6bad0ebbc5 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 fde7fb53f1c..422fac3c089 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 f6df84b514a..3ae81584f87 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 35d9f576495..ccc2ab1374d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 c165b3b06b0..2e2f23cb42d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 366bc2e5e8f..ca5de075689 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 0483f7d434d..7ecb71f6510 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 81661afdaea..d420a3db503 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 936f3a8145d..054ec25714c 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 fb455f54090..51356605260 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 3536a792cdb..d0be5f3bacb 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 675e0005465..6e700248449 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 bfd5d76a1cf..de5d3352a41 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 861bfb31416..5ff9e74bee7 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 dcc5060d63e..d1e106c13bf 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 d4494817e98..540af0e8a01 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 ab57a726afa..9033b35cf0e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 0bb97638ef1..088cf370c24 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 2f14b703e2e..6343047ace8 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 14fb1ddbdbd..318844d295d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 8b26fb0bc82..76d047443f9 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 bc74dc3c505..7e0e0e51a70 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb
index 9862c79aa4c..933d47ca459 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b293f262d96..5e86bcad4a9 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 6b65604d88c..b88b29128b2 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb
index e3bb6474fad..83fba18d8a9 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb
index 8d901102e1b..85b081c5919 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 fb34df8e52c..b94abca21d3 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 69964e3a08f..288b8bfe754 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 7012d55a4a4..afc0cb0a09c 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 cbfa5151ab7..47616059ade 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 c423763c41b..a5c3437a4db 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 c1a7ab15265..b8364af505a 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb
index e598f6cff7c..6764a2cc89e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 2bfa7a31c6d..0a7a34f579f 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 e76bb09ab64..767e45386cf 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b62556577f6..409225f0059 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 953e3f1d746..d2d69117f19 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb
index 9424a21f42e..da565cfa05e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb
index e147570446a..06937256d8e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb
index 4bf4fc28ff8..c83546057d2 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 166ff83239d..c4222f8d8bb 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 8143a9fe321..ebaba179f71 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 098dc4afaa3..e0ab453151d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b804ab530e9..cdacd34c7c5 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 6f4be870da1..bc73cdd5db4 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 301036417fd..2ca2e6b97a0 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec
index 0be14e3aeb6..96169903f6c 100644
--- a/samples/client/petstore/ruby-faraday/petstore.gemspec
+++ b/samples/client/petstore/ruby-faraday/petstore.gemspec
@@ -8,7 +8,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb
index 8d227b6a841..f812accb6b1 100644
--- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb
+++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb
index 1a1425b7dbd..679bb46811a 100644
--- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb
+++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb
index 3e01c3245d5..fe3416f0486 100644
--- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb
+++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/ruby/.openapi-generator/VERSION
+++ b/samples/client/petstore/ruby/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 4955ed5ca04..d12ff44e87c 100644
--- a/samples/client/petstore/ruby/lib/petstore.rb
+++ b/samples/client/petstore/ruby/lib/petstore.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 2995f4f218f..4c129aefd96 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb
index 088bd19e111..a6641555bc2 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 ca5a5866fd0..d1bf3ebee82 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 0edcf47e87c..0a69ee66dbe 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 1d2d271de2b..35dcea6e0c0 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 60846d11d27..8b8e0ee9ea9 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 32f64b6f77c..8e1e6a3a847 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b91c5af736a..77986943883 100644
--- a/samples/client/petstore/ruby/lib/petstore/api_client.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 fde7fb53f1c..422fac3c089 100644
--- a/samples/client/petstore/ruby/lib/petstore/api_error.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb
index 7404507e998..f9860f4a4d1 100644
--- a/samples/client/petstore/ruby/lib/petstore/configuration.rb
+++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 35d9f576495..ccc2ab1374d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 c165b3b06b0..2e2f23cb42d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 366bc2e5e8f..ca5de075689 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 0483f7d434d..7ecb71f6510 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 81661afdaea..d420a3db503 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 936f3a8145d..054ec25714c 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 fb455f54090..51356605260 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 3536a792cdb..d0be5f3bacb 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 675e0005465..6e700248449 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 bfd5d76a1cf..de5d3352a41 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/category.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 861bfb31416..5ff9e74bee7 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 dcc5060d63e..d1e106c13bf 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/client.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 d4494817e98..540af0e8a01 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 ab57a726afa..9033b35cf0e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 0bb97638ef1..088cf370c24 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 2f14b703e2e..6343047ace8 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 14fb1ddbdbd..318844d295d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 8b26fb0bc82..76d047443f9 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/file.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 bc74dc3c505..7e0e0e51a70 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb
index 9862c79aa4c..933d47ca459 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b293f262d96..5e86bcad4a9 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 6b65604d88c..b88b29128b2 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb
index e3bb6474fad..83fba18d8a9 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb
index 8d901102e1b..85b081c5919 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 fb34df8e52c..b94abca21d3 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/list.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 69964e3a08f..288b8bfe754 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 7012d55a4a4..afc0cb0a09c 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 cbfa5151ab7..47616059ade 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 c423763c41b..a5c3437a4db 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 c1a7ab15265..b8364af505a 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/name.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb
index e598f6cff7c..6764a2cc89e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 2bfa7a31c6d..0a7a34f579f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 e76bb09ab64..767e45386cf 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/order.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b62556577f6..409225f0059 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 953e3f1d746..d2d69117f19 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb
index 9424a21f42e..da565cfa05e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb
index e147570446a..06937256d8e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb
index 4bf4fc28ff8..c83546057d2 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 166ff83239d..c4222f8d8bb 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 8143a9fe321..ebaba179f71 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 098dc4afaa3..e0ab453151d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 b804ab530e9..cdacd34c7c5 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 6f4be870da1..bc73cdd5db4 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/user.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb
index 301036417fd..2ca2e6b97a0 100644
--- a/samples/client/petstore/ruby/lib/petstore/version.rb
+++ b/samples/client/petstore/ruby/lib/petstore/version.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec
index 4691f6a17f4..d55199e7a30 100644
--- a/samples/client/petstore/ruby/petstore.gemspec
+++ b/samples/client/petstore/ruby/petstore.gemspec
@@ -8,7 +8,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-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 406dad1efee..72af1e8bee5 100644
--- a/samples/client/petstore/ruby/spec/api_client_spec.rb
+++ b/samples/client/petstore/ruby/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb
index 1a1425b7dbd..679bb46811a 100644
--- a/samples/client/petstore/ruby/spec/configuration_spec.rb
+++ b/samples/client/petstore/ruby/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb
index 3e01c3245d5..fe3416f0486 100644
--- a/samples/client/petstore/ruby/spec/spec_helper.rb
+++ b/samples/client/petstore/ruby/spec/spec_helper.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION
+++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION
+++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION
+++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 3bac2c9db3c..584510a41a3 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 86de75e7852..1f20deb2212 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 fbc69f874c3..4e94ceae0a3 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
index 2abdbf72b98..7ad0a081067 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
index 6e0c5eff316..7b944a29666 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
index df5916f199d..e12dbb59731 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
index e0b0d8a74c1..87cb1896b25 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
index cfc87b56830..0b3d31e95cc 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
index eaccc0906e4..e57c65c8167 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 2abdbf72b98..7ad0a081067 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 6e0c5eff316..7b944a29666 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 df5916f199d..e12dbb59731 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 83466fd2e9c..250e25dea10 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 75e047b4bb3..ef50bba52ac 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 e70bdda2252..ca589ff573c 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION
+++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml
index fd90b069f05..4e5340c4d3f 100644
--- a/samples/meta-codegen/lib/pom.xml
+++ b/samples/meta-codegen/lib/pom.xml
@@ -121,7 +121,7 @@
     </dependencies>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <openapi-generator-version>5.0.0</openapi-generator-version>
+        <openapi-generator-version>5.0.1-SNAPSHOT</openapi-generator-version>
         <maven-plugin-version>1.0.0</maven-plugin-version>
         <junit-version>4.8.1</junit-version>
     </properties>
diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/meta-codegen/usage/.openapi-generator/VERSION
+++ b/samples/meta-codegen/usage/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/elm/.openapi-generator/VERSION
+++ b/samples/openapi3/client/elm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION
+++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec
index 0fa6ded304c..819bb560590 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec
@@ -8,7 +8,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb
index c0e3d8e6c71..c57950ab613 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb
index 9b88674708a..6c11d4b5757 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb
index eb388ff5b1c..d98eebebd50 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb
index cce218345bf..5474ff9a674 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb
index d759a51b747..9a82693f0f2 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb
index ad15995f5ca..0351493546c 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb
index ff8a4e30313..6974ff5b2f3 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb
index e385e7d30e5..cbbdaac18d1 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb
index 46bfc11bd14..5eec3e85e99 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb
index 2edeb80a4dc..7cfa1a628af 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb
index 5749d09f07c..360ae897cba 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb
index 6f52d448c4a..8cdc7630379 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb
index c865608d1f9..668d71a2d89 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb
index 2991df8c1f3..587ccece09e 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb
index 72dc1cf3843..b74a8c39911 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb
index 3ad94753036..de2289c4df9 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb
index 412cdb399e4..04fce6c2415 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec
index a67113163bb..241cc8ab543 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec
@@ -8,7 +8,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb
index 8919bb176ec..aebefcad0f0 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb
index 8a70975d089..4971822a84f 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb
index f638e39341b..99c6a67ae25 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb
@@ -6,7 +6,7 @@
 The version of the OpenAPI document: 1.0.0
 
 Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.0
+OpenAPI Generator version: 5.0.1-SNAPSHOT
 
 =end
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100755
--- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/schema/petstore/mysql/.openapi-generator/VERSION
+++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 b9ceaa7ae74..910e47e6dcf 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 &#x60;special-key&#x60; to test the authorization filters.
 
-Generated by OpenAPI Generator 5.0.0.
+Generated by OpenAPI Generator 5.0.1-SNAPSHOT.
 
 ## Requires
 
diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt
index 8757bd72a8b..103e8652a75 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt
+++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
 */
diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt
index 86c226bc38d..455423f0716 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt
+++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
 */
diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt
index c129310e5e7..61afd21e984 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt
+++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
 */
diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/python-flask/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 69a61093cfa..da56a77b599 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 95e0d879d70..b45caa2de8e 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5acbf467c6a..a1234ff3aca 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 8b62119dba2..2022ab2a0f5 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 fc913468725..12352fa31bc 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 91f2847d603..702ae2570f8 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 ae6d83a88fe..d2f155857b0 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 4b1d8a1e2a2..25342e235ba 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
index 8e846a3795a..bdcecfe3cf7 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java
index 4b1d8a1e2a2..25342e235ba 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
index 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java
index cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
index 0f432ec41b6..0754d72af3e 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
index c05e216a659..25cbb63b4b2 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
index 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
index cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 8e846a3795a..bdcecfe3cf7 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 4b1d8a1e2a2..25342e235ba 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index cd16fbef802..f72ae4b1c7b 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
index 92f09271e11..4a596e2b11a 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 0a9911cbe72..452dd62ed81 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java
index 9f62f15a49d..d23969a22e3 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
index ff5444e8e81..fb05cf630e2 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java
index b1e31c18119..bdefaf5d2a2 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 8e846a3795a..bdcecfe3cf7 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 4b1d8a1e2a2..25342e235ba 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 e0c9017c080..9c01f75afe0 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 bb6bd3eb1ff..2da2b847c2f 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 844cb9e8847..47091b78bf5 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 9d1af352683..e029a994226 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 e3f94dea454..6f52e8390f9 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 05fcb71845a..3c6ec85cb48 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 e0c9017c080..9c01f75afe0 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 bb6bd3eb1ff..2da2b847c2f 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 844cb9e8847..47091b78bf5 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 9d1af352683..e029a994226 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 e3f94dea454..6f52e8390f9 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 05fcb71845a..3c6ec85cb48 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 df677d4cdf3..2bfabe63f56 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 ffe2105bad8..09f4e18f0a7 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 7fd2b06ec94..c3c43737d8d 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 c9a868648b0..0c0fc1c0abd 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 9500fd8817b..ee0ffbf54db 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 0d43956181b..13c7b9adad9 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 498aa862624..b1bf904ac3c 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 a34218d1ab9..04dbac05437 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 a9b01a1f909..750062667dd 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5ee29d654b2..f353848fd24 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 04e8a9734c6..dc91d119f24 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 45d0b27a035..c021abe0325 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
index cd16fbef802..f72ae4b1c7b 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java
index ba53ca2bb47..e297f0c42d4 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 0a9911cbe72..452dd62ed81 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java
index 6e5db7ccffd..847cfb9e946 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java
index ff5444e8e81..fb05cf630e2 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java
index b1e31c18119..bdefaf5d2a2 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java
index e0c9017c080..9c01f75afe0 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java
index fc1e1b08016..3e24b587f50 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 844cb9e8847..47091b78bf5 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java
index 408cdc91aac..68bfd694342 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java
index e3f94dea454..6f52e8390f9 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java
index 05fcb71845a..3c6ec85cb48 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
index cd16fbef802..f72ae4b1c7b 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java
index ba53ca2bb47..e297f0c42d4 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 0a9911cbe72..452dd62ed81 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java
index 6e5db7ccffd..847cfb9e946 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java
index ff5444e8e81..fb05cf630e2 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java
index b1e31c18119..bdefaf5d2a2 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION
index 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
index 0f432ec41b6..0754d72af3e 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
index c05e216a659..25cbb63b4b2 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
index 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
index cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 b900bf427df..e796709266c 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 21903581e4b..b7daac32011 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 2bac6f9795e..991b7d3ec9d 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 fb2c7fca985..ba9a9d5cc22 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 492c069cb2c..6d7720baa59 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 8b036b1620b..1130fa691a9 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 65d26082a76..14b2eb595d5 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 91c67b94e83..54b295a0c7a 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 28cbf7c0aae..3fa3b389a57 100644
--- a/samples/server/petstore/springboot/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0
\ No newline at end of file
+5.0.1-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 300f660e2a5..301f52aa109 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 8e846a3795a..bdcecfe3cf7 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 5338ab7c494..c0c707430e9 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 4b1d8a1e2a2..25342e235ba 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 820b8d3a133..013d137460b 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-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 cc3d4568653..ac0b6b997e7 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
 /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.0).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT).
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
-- 
GitLab


From c3220848f24bbc5e5441f53846916eaa82e6673c Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Mon, 21 Dec 2020 20:37:40 +0800
Subject: [PATCH 02/28] Update readme after 5.0.0 release (#8250)

* add badge for 5.1.x branch

* add badge for 6.0.0

* minor change

* update pr tempalte
---
 .github/PULL_REQUEST_TEMPLATE.md |  2 +-
 README.md                        | 22 ++++++++++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index cf1c0bfefa1..634ba51b9bd 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -7,5 +7,5 @@
 - [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
 - [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) beforehand.
 - [ ] Run the shell script `./bin/generate-samples.sh`to update all Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
-- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`
+- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `5.1.x`, `6.0.x`
 - [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
diff --git a/README.md b/README.md
index 48e5a79fdb2..71876180043 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
 
 <div align="center">
 
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.0`):
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.1`):
 [![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)
@@ -18,6 +18,22 @@
 [![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
 [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/openapitools/openapi-generator/Check%20Supported%20Java%20Versions/master?label=Check%20Supported%20Java%20Versions&logo=github&logoColor=green)](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22)
 
+[5.1.x](https://github.com/OpenAPITools/openapi-generator/tree/5.1.x) (`5.1.x`):
+[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/5.1.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
+[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/5.1.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
+[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=5.1.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
+[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=5.1.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/5.1.x)](https://cloud.drone.io/OpenAPITools/openapi-generator)
+[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/5.1.x?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
+
+[6.0.x](https://github.com/OpenAPITools/openapi-generator/tree/6.0.x) (`6.0.x`):
+[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/6.0.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
+[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/6.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
+[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=6.0.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
+[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=6.0.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/6.0.x)](https://cloud.drone.io/OpenAPITools/openapi-generator)
+[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/6.0.x?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
+
 </div>
 
 <div align="center">
@@ -102,7 +118,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
 
 | OpenAPI Generator Version                                                                                                                                 | Release Date | Notes                                             |
 | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
-| 5.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.1-SNAPSHOT/) | TBD   | Patch release with enhancements, bug fixes, etc |
+| 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Nov/Dec 2021   | Minor release with breaking changes (no fallback) |
+| 5.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.1.0-SNAPSHOT/) | Mar/Apr 2021   | Minor release with breaking changes (with fallback) |
+| 5.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.1-SNAPSHOT/) | Jan/Feb 2021   | Patch release with enhancements, bug fixes, etc |
 | [5.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) (latest stable release)                                                    | 21.12.2020   | Major release with breaking changes (no fallback) |
 | [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1)                                                    | 06.05.2020   | Patch release (enhancements, bug fixes, etc)                       |
 
-- 
GitLab


From 9889e5dfba6f2c92b3f898e9ae7241fcf4fca3f0 Mon Sep 17 00:00:00 2001
From: Tomofumi Chiba <tomofumi.chiba@gmail.com>
Date: Mon, 28 Dec 2020 21:57:00 +0900
Subject: [PATCH 03/28] [typescript(experimental)] fix for Deno v1.6 (#8265)

* fix for Deno 1.6

* update dependency version of Deno test code
---
 .travis.yml                                                  | 2 +-
 .../src/main/resources/typescript/index.mustache             | 5 +++--
 .../client/petstore/typescript/builds/default/index.ts       | 3 ++-
 .../openapi3/client/petstore/typescript/builds/deno/index.ts | 5 +++--
 .../client/petstore/typescript/builds/inversify/index.ts     | 3 ++-
 .../client/petstore/typescript/builds/jquery/index.ts        | 3 ++-
 .../client/petstore/typescript/builds/object_params/index.ts | 3 ++-
 .../petstore/typescript/tests/deno/test/api/PetApi_test.ts   | 2 +-
 8 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 52ad4a03ce7..9739c019ad0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -124,7 +124,7 @@ before_install:
     fi;
   - pushd .; cd website; yarn install; popd
   # install Deno
-  - sh -s v1.1.2 < ./CI/deno_install.sh
+  - sh -s v1.6.2 < ./CI/deno_install.sh
   - export PATH="$HOME/.deno/bin:$PATH"
 
 install:
diff --git a/modules/openapi-generator/src/main/resources/typescript/index.mustache b/modules/openapi-generator/src/main/resources/typescript/index.mustache
index 3e4d0907d0e..b19f7f9348a 100644
--- a/modules/openapi-generator/src/main/resources/typescript/index.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript/index.mustache
@@ -1,7 +1,8 @@
 export * from "./http/http{{extensionForDeno}}";
 export * from "./auth/auth{{extensionForDeno}}";
 export * from "./models/all{{extensionForDeno}}";
-export { createConfiguration, Configuration } from "./configuration{{extensionForDeno}}"
+export { createConfiguration } from "./configuration{{extensionForDeno}}"
+export{{#platforms}}{{#deno}} type{{/deno}}{{/platforms}} { Configuration } from "./configuration{{extensionForDeno}}"
 export * from "./apis/exception{{extensionForDeno}}";
 export * from "./servers{{extensionForDeno}}";
 
@@ -9,7 +10,7 @@ export * from "./servers{{extensionForDeno}}";
 export { Middleware } from './middleware{{extensionForDeno}}';
 {{/useRxJS}}
 {{^useRxJS}}
-export { PromiseMiddleware as Middleware } from './middleware{{extensionForDeno}}';
+export{{#platforms}}{{#deno}} type{{/deno}}{{/platforms}} { PromiseMiddleware as Middleware } from './middleware{{extensionForDeno}}';
 {{/useRxJS}}
 {{#useObjectParameters}}
 export { {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{classname}}{{operationIdCamelCase}}Request, {{/operation}}Object{{classname}} as {{classname}}{{^-last}}, {{/-last}} {{/operations}}{{/apis}}{{/apiInfo}}} from './types/ObjectParamAPI{{extensionForDeno}}';
diff --git a/samples/openapi3/client/petstore/typescript/builds/default/index.ts b/samples/openapi3/client/petstore/typescript/builds/default/index.ts
index fe00e36cbd8..de89bb05e70 100644
--- a/samples/openapi3/client/petstore/typescript/builds/default/index.ts
+++ b/samples/openapi3/client/petstore/typescript/builds/default/index.ts
@@ -1,7 +1,8 @@
 export * from "./http/http";
 export * from "./auth/auth";
 export * from "./models/all";
-export { createConfiguration, Configuration } from "./configuration"
+export { createConfiguration } from "./configuration"
+export { Configuration } from "./configuration"
 export * from "./apis/exception";
 export * from "./servers";
 
diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/index.ts b/samples/openapi3/client/petstore/typescript/builds/deno/index.ts
index b0cc9f0f93d..c81b0e2421d 100644
--- a/samples/openapi3/client/petstore/typescript/builds/deno/index.ts
+++ b/samples/openapi3/client/petstore/typescript/builds/deno/index.ts
@@ -1,10 +1,11 @@
 export * from "./http/http.ts";
 export * from "./auth/auth.ts";
 export * from "./models/all.ts";
-export { createConfiguration, Configuration } from "./configuration.ts"
+export { createConfiguration } from "./configuration.ts"
+export type { Configuration } from "./configuration.ts"
 export * from "./apis/exception.ts";
 export * from "./servers.ts";
 
-export { PromiseMiddleware as Middleware } from './middleware.ts';
+export type { PromiseMiddleware as Middleware } from './middleware.ts';
 export { PromisePetApi as PetApi,  PromiseStoreApi as StoreApi,  PromiseUserApi as UserApi } from './types/PromiseAPI.ts';
 
diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts
index ddf4ed98b1d..4d48e5222ad 100644
--- a/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts
+++ b/samples/openapi3/client/petstore/typescript/builds/inversify/index.ts
@@ -1,7 +1,8 @@
 export * from "./http/http";
 export * from "./auth/auth";
 export * from "./models/all";
-export { createConfiguration, Configuration } from "./configuration"
+export { createConfiguration } from "./configuration"
+export { Configuration } from "./configuration"
 export * from "./apis/exception";
 export * from "./servers";
 
diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts
index fe00e36cbd8..de89bb05e70 100644
--- a/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts
+++ b/samples/openapi3/client/petstore/typescript/builds/jquery/index.ts
@@ -1,7 +1,8 @@
 export * from "./http/http";
 export * from "./auth/auth";
 export * from "./models/all";
-export { createConfiguration, Configuration } from "./configuration"
+export { createConfiguration } from "./configuration"
+export { Configuration } from "./configuration"
 export * from "./apis/exception";
 export * from "./servers";
 
diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts
index e3944796cfe..49a513cbb84 100644
--- a/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts
+++ b/samples/openapi3/client/petstore/typescript/builds/object_params/index.ts
@@ -1,7 +1,8 @@
 export * from "./http/http";
 export * from "./auth/auth";
 export * from "./models/all";
-export { createConfiguration, Configuration } from "./configuration"
+export { createConfiguration } from "./configuration"
+export { Configuration } from "./configuration"
 export * from "./apis/exception";
 export * from "./servers";
 
diff --git a/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts b/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts
index 9f56de86eab..f29199404e3 100644
--- a/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts
+++ b/samples/openapi3/client/petstore/typescript/tests/deno/test/api/PetApi_test.ts
@@ -2,7 +2,7 @@ import {
   assertEquals,
   assert,
   fail,
-} from "https://deno.land/std@0.58.0/testing/asserts.ts";
+} from "https://deno.land/std@0.82.0/testing/asserts.ts";
 import * as petstore from "../../../../builds/deno/index.ts";
 
 const configuration = petstore.createConfiguration();
-- 
GitLab


From fd02bc3d848d3a6a27bdec7469f13ada430b4e81 Mon Sep 17 00:00:00 2001
From: fbl100 <frank.levine@gmail.com>
Date: Mon, 28 Dec 2020 12:30:29 -0500
Subject: [PATCH 04/28] Fixes issue 8052: Stackoverflow in toExampleValue() for
 python client (#8054)

Added a Set<String> in toExampleValueRecursive() to keep track of which models we have
generated to avoid an infinite recursion for recursive models.  An example of a recursive
model would be a GeoJson GeometryCollection.

Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
---
 .../languages/PythonClientCodegen.java        | 55 ++++++++++--
 .../codegen/python/PythonClientTest.java      | 39 +++++++++
 .../3_0/issue_8052_recursive_model.yaml       | 83 +++++++++++++++++++
 ...ue_8052_recursive_model_expected_value.txt |  9 ++
 4 files changed, 177 insertions(+), 9 deletions(-)
 create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml
 create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
index 2a84a4fb6cd..534c5248293 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
@@ -16,6 +16,7 @@
 
 package org.openapitools.codegen.languages;
 
+import com.google.common.collect.Sets;
 import io.swagger.v3.core.util.Json;
 import io.swagger.v3.oas.models.media.*;
 import io.swagger.v3.oas.models.media.ArraySchema;
@@ -879,7 +880,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
 
     public String toExampleValue(Schema schema, Object objExample) {
         String modelName = getModelName(schema);
-        return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0);
+        return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0, Sets.newHashSet());
     }
 
     private Boolean simpleStringSchema(Schema schema) {
@@ -925,9 +926,12 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
      *                    ModelName( line 0
      *                        some_property='some_property_example' line 1
      *                    ) line 2
+     * @param seenSchemas This set contains all the schemas passed into the recursive function. It is used to check
+     *                    if a schema was already passed into the function and breaks the infinite recursive loop. The
+     *                    only schemas that are not added are ones that contain $ref != null
      * @return the string example
      */
-    private String toExampleValueRecursive(String modelName, Schema schema, Object objExample, int indentationLevel, String prefix, Integer exampleLine) {
+    private String toExampleValueRecursive(String modelName, Schema schema, Object objExample, int indentationLevel, String prefix, Integer exampleLine, Set<Schema> seenSchemas) {
         final String indentionConst = "    ";
         String currentIndentation = "";
         String closingIndentation = "";
@@ -951,6 +955,27 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
         if (objExample != null) {
             example = objExample.toString();
         }
+        // checks if the current schema has already been passed in. If so, breaks the current recursive pass
+        if (seenSchemas.contains(schema)){
+            if (modelName != null) {
+                return fullPrefix + modelName + closeChars;
+            } else {
+                // this is a recursive schema
+                // need to add a reasonable example to avoid
+                // infinite recursion
+                if(ModelUtils.isNullable(schema)) {
+                    // if the schema is nullable, then 'None' is a valid value
+                    return fullPrefix + "None" + closeChars;
+                } else if(ModelUtils.isArraySchema(schema)) {
+                    // the schema is an array, add an empty array
+                    return fullPrefix + "[]" + closeChars;
+                } else {
+                    // the schema is an object, make an empty object
+                    return fullPrefix + "{}" + closeChars;
+                }
+            }
+        }
+
         if (null != schema.get$ref()) {
             Map<String, Schema> allDefinitions = ModelUtils.getSchemas(this.openAPI);
             String ref = ModelUtils.getSimpleRef(schema.get$ref());
@@ -960,7 +985,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                 return fullPrefix + "None" + closeChars;
             }
             String refModelName = getModelName(schema);
-            return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine);
+            return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas);
         } else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) {
             // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
             // though this tooling supports it.
@@ -1058,7 +1083,8 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
             ArraySchema arrayschema = (ArraySchema) schema;
             Schema itemSchema = arrayschema.getItems();
             String itemModelName = getModelName(itemSchema);
-            example = fullPrefix + "[" + "\n" + toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1) + ",\n" + closingIndentation + "]" + closeChars;
+            seenSchemas.add(schema);
+            example = fullPrefix + "[" + "\n" + toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1, seenSchemas) + ",\n" + closingIndentation + "]" + closeChars;
             return example;
         } else if (ModelUtils.isMapSchema(schema)) {
             if (modelName == null) {
@@ -1080,7 +1106,8 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                     addPropPrefix = ensureQuotes(key) + ": ";
                 }
                 String addPropsModelName = getModelName(addPropsSchema);
-                example = fullPrefix + "\n" + toExampleValueRecursive(addPropsModelName, addPropsSchema, addPropsExample, indentationLevel + 1, addPropPrefix, exampleLine + 1) + ",\n" + closingIndentation + closeChars;
+                seenSchemas.add(schema);
+                example = fullPrefix + "\n" + toExampleValueRecursive(addPropsModelName, addPropsSchema, addPropsExample, indentationLevel + 1, addPropPrefix, exampleLine + 1, seenSchemas) + ",\n" + closingIndentation + closeChars;
             } else {
                 example = fullPrefix + closeChars;
             }
@@ -1103,7 +1130,12 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                     return fullPrefix + closeChars;
                 }
             }
-            return exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation);
+            // Adds schema to seenSchemas before running example model function. romoves schema after running
+            // the function. It also doesnt keep track of any schemas within the ObjectModel.
+            seenSchemas.add(schema);
+            String exampleForObjectModel = exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation, seenSchemas);
+            seenSchemas.remove(schema);
+            return exampleForObjectModel;
         } else if (ModelUtils.isComposedSchema(schema)) {
             // TODO add examples for composed schema models without discriminators
 
@@ -1117,7 +1149,12 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                     CodegenProperty cp = new CodegenProperty();
                     cp.setName(disc.getPropertyName());
                     cp.setExample(discPropNameValue);
-                    return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation);
+                    // Adds schema to seenSchemas before running example model function. romoves schema after running
+                    // the function. It also doesnt keep track of any schemas within the ObjectModel.
+                    seenSchemas.add(modelSchema);
+                    String exampleForObjectModel = exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, seenSchemas);
+                    seenSchemas.remove(modelSchema);
+                    return exampleForObjectModel;
                 } else {
                     return fullPrefix + closeChars;
                 }
@@ -1130,7 +1167,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
         return example;
     }
 
-    private String exampleForObjectModel(Schema schema, String fullPrefix, String closeChars, CodegenProperty discProp, int indentationLevel, int exampleLine, String closingIndentation) {
+    private String exampleForObjectModel(Schema schema, String fullPrefix, String closeChars, CodegenProperty discProp, int indentationLevel, int exampleLine, String closingIndentation, Set<Schema> seenSchemas) {
         Map<String, Schema> requiredAndOptionalProps = schema.getProperties();
         if (requiredAndOptionalProps == null || requiredAndOptionalProps.isEmpty()) {
             return fullPrefix + closeChars;
@@ -1150,7 +1187,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                 propModelName = getModelName(propSchema);
                 propExample = exampleFromStringOrArraySchema(propSchema, null, propName);
             }
-            example += toExampleValueRecursive(propModelName, propSchema, propExample, indentationLevel + 1, propName + "=", exampleLine + 1) + ",\n";
+            example += toExampleValueRecursive(propModelName, propSchema, propExample, indentationLevel + 1, propName + "=", exampleLine + 1, seenSchemas) + ",\n";
         }
         // TODO handle additionalProperties also
         example += closingIndentation + closeChars;
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java
index 683d4aa4b02..6c46b6b6117 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java
@@ -15,6 +15,18 @@
  */
 
 package org.openapitools.codegen.python;
+import com.google.common.io.Resources;
+import io.swagger.v3.oas.models.PathItem;
+import io.swagger.v3.oas.models.Paths;
+import io.swagger.v3.oas.models.parameters.RequestBody;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.nio.charset.StandardCharsets;
+import javax.validation.constraints.AssertTrue;
+import org.apache.commons.io.IOUtils;
 import org.openapitools.codegen.config.CodegenConfigurator;
 
 import com.google.common.collect.Sets;
@@ -33,6 +45,7 @@ import org.openapitools.codegen.*;
 import org.openapitools.codegen.languages.PythonClientCodegen;
 import org.openapitools.codegen.utils.ModelUtils;
 import org.testng.Assert;
+import org.testng.TestNGAntTask.Mode;
 import org.testng.annotations.Test;
 
 @SuppressWarnings("static-method")
@@ -425,4 +438,30 @@ public class PythonClientTest {
         final CodegenModel model = codegen.fromModel(modelName, modelSchema);
         Assert.assertEquals((int) model.getMinProperties(), 1);
     }
+
+    @Test(description = "tests RecursiveToExample")
+    public void testRecursiveToExample() throws IOException {
+        final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_8052_recursive_model.yaml");
+        final PythonClientCodegen codegen = new PythonClientCodegen();
+        codegen.setOpenAPI(openAPI);
+
+        final Operation operation = openAPI.getPaths().get("/geojson").getPost();
+        Schema schema = ModelUtils.getSchemaFromRequestBody(operation.getRequestBody());
+        String exampleValue = codegen.toExampleValue(schema, null);
+
+        // uncomment if you need to regenerate the expected value
+        //        PrintWriter printWriter = new PrintWriter("src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt");
+        //        printWriter.write(exampleValue);
+        //        printWriter.close();
+        //        org.junit.Assert.assertTrue(false);
+
+        String expectedValue = Resources.toString(
+                Resources.getResource("3_0/issue_8052_recursive_model_expected_value.txt"),
+                StandardCharsets.UTF_8);
+
+
+        Assert.assertEquals(expectedValue.trim(), exampleValue.trim());
+
+    }
+
 }
diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml
new file mode 100644
index 00000000000..6d833b29211
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml
@@ -0,0 +1,83 @@
+openapi: 3.0.0
+info:
+  version: 01.01.00
+  title: APITest API documentation.
+  termsOfService: http://api.apitest.com/party/tos/
+servers:
+  - url: https://api.apitest.com/v1
+paths:
+  /geojson:
+    post:
+      summary: Add a GeoJson Object
+      operationId: post-geojson
+      responses:
+        '201':
+          description: Created
+          content:
+            application/json:
+              schema:
+                type: string
+                description: GeoJson ID
+        '400':
+          description: Bad Request
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/GeoJsonGeometry'
+      parameters: []
+components:
+  schemas:
+    GeoJsonGeometry:
+      title: GeoJsonGeometry
+      description: GeoJSON geometry
+      oneOf:
+        - $ref: '#/components/schemas/Point'
+        - $ref: '#/components/schemas/GeometryCollection'
+      discriminator:
+        propertyName: type
+        mapping:
+          Point: '#/components/schemas/Point'
+          GeometryCollection: '#/components/schemas/GeometryCollection'
+      externalDocs:
+        url: http://geojson.org/geojson-spec.html#geometry-objects
+    Point:
+      title: Point
+      type: object
+      description: GeoJSON geometry
+      externalDocs:
+        url: http://geojson.org/geojson-spec.html#id2
+      properties:
+        coordinates:
+          title: Point3D
+          type: array
+          description: Point in 3D space
+          externalDocs:
+            url: http://geojson.org/geojson-spec.html#id2
+          minItems: 2
+          maxItems: 3
+          items:
+            type: number
+            format: double
+        type:
+          type: string
+          default: Point
+      required:
+        - type
+    GeometryCollection:
+      title: GeometryCollection
+      type: object
+      description: GeoJSon geometry collection
+      required:
+        - type
+        - geometries
+      externalDocs:
+        url: http://geojson.org/geojson-spec.html#geometrycollection
+      properties:
+        type:
+          type: string
+          default: GeometryCollection
+        geometries:
+          type: array
+          items:
+            $ref: '#/components/schemas/GeoJsonGeometry'
diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt b/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt
new file mode 100644
index 00000000000..98ef62651fb
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt
@@ -0,0 +1,9 @@
+GeoJsonGeometry(
+        type="GeometryCollection",
+        geometries=[
+            GeoJsonGeometry(
+                type="GeometryCollection",
+                geometries=[],
+            ),
+        ],
+    )
\ No newline at end of file
-- 
GitLab


From 775b64f6c7f9648e328fa326341c824ea89dda3f Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Tue, 29 Dec 2020 15:31:12 +0000
Subject: [PATCH 05/28] [swift5] add URLResponse to ErrorResponse (#8267)

* [swift5] add URLResponse to ErrorResponse

* [swift] improve unit tests

* [swift] improve unit tests
---
 .../src/main/resources/swift5/Models.mustache |  2 +-
 .../src/main/resources/swift5/api.mustache    |  2 +-
 .../AlamofireImplementations.mustache         | 26 +++++++++----------
 .../URLSessionImplementations.mustache        | 22 ++++++++--------
 ...ith-fake-endpoints-models-for-testing.yaml |  2 ++
 pom.xml                                       | 21 +++++++++++++--
 .../.openapi-generator/VERSION                |  2 +-
 .../OpenAPIs/AlamofireImplementations.swift   | 26 +++++++++----------
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../SwaggerClientTests/FileUtils.swift        |  2 +-
 .../combineLibrary/.openapi-generator/VERSION |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../SwaggerClientTests/FileUtils.swift        |  2 +-
 .../swift5/default/.openapi-generator/VERSION |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../SwaggerClientTests/FileUtils.swift        |  2 +-
 .../deprecated/.openapi-generator/FILES       |  4 ---
 .../deprecated/.openapi-generator/VERSION     |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../petstore/swift5/deprecated/README.md      |  2 --
 .../nonPublicApi/.openapi-generator/VERSION   |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../objcCompatible/.openapi-generator/VERSION |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../.openapi-generator/VERSION                |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../SwaggerClientTests/FileUtils.swift        |  2 +-
 .../.openapi-generator/VERSION                |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../resultLibrary/.openapi-generator/VERSION  |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../rxswiftLibrary/.openapi-generator/VERSION |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../SwaggerClientTests/FileUtils.swift        |  2 +-
 .../.openapi-generator/VERSION                |  2 +-
 .../Classes/OpenAPIs/Models.swift             |  2 +-
 .../Classes/OpenAPIs/Models/Category.swift    |  2 +-
 .../Classes/OpenAPIs/Models/Tag.swift         |  2 +-
 .../OpenAPIs/URLSessionImplementations.swift  | 22 ++++++++--------
 .../SwaggerClientTests/FileUtils.swift        |  2 +-
 67 files changed, 218 insertions(+), 205 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache
index 9a3f50d5d8e..595bd9419c2 100644
--- a/modules/openapi-generator/src/main/resources/swift5/Models.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum ErrorResponse : Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum DownloadException : Error {
diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache
index b5aedeb389b..20a37a94e03 100644
--- a/modules/openapi-generator/src/main/resources/swift5/api.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache
@@ -48,7 +48,7 @@ extension {{projectName}}API {
     {{#isDeprecated}}
     @available(*, deprecated, message: "This operation is deprecated.")
     {{/isDeprecated}}
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?,_ error: Error?) -> Void)) {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void)) {
         {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in
             switch result {
             {{#returnType}}
diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache
index 9b5389031e9..410799db9c7 100644
--- a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache
@@ -103,7 +103,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                     self.processRequest(request: upload, managerId, apiResponseQueue, completion)
                 case .failure(let encodingError):
                     apiResponseQueue.async{
-                        completion(.failure(ErrorResponse.error(415, nil, encodingError)))
+                        completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
                     }
                 }
             })
@@ -137,7 +137,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case let .success(value):
                     completion(.success(Response(response: stringResponse.response!, body: value as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error)))
                 }
                 
             })
@@ -179,9 +179,9 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                     completion(.success(Response(response: dataResponse.response!, body: filePath as? T)))
 
                 } catch let requestParserError as DownloadException {
-                    completion(.failure(ErrorResponse.error(400, dataResponse.data, requestParserError)))
+                    completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, requestParserError)))
                 } catch let error {
-                    completion(.failure(ErrorResponse.error(400, dataResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, error)))
                 }
                 return
             })
@@ -193,7 +193,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case .success:
                     completion(.success(Response(response: voidResponse.response!, body: nil)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error)))
                 }
                 
             })
@@ -205,7 +205,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case .success:
                     completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error)))
                 }
                 
             })
@@ -295,7 +295,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case let .success(value):
                     completion(.success(Response(response: stringResponse.response!, body: value as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error)))
                 }
 
             })
@@ -307,7 +307,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case .success:
                     completion(.success(Response(response: voidResponse.response!, body: nil)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error)))
                 }
 
             })
@@ -319,7 +319,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case .success:
                     completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error)))
                 }
 
             })
@@ -328,17 +328,17 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 cleanupRequest()
 
                 guard dataResponse.result.isSuccess else {
-                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)))
+                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, dataResponse.result.error!)))
                     return
                 }
 
                 guard let data = dataResponse.data, !data.isEmpty else {
-                    completion(.failure(ErrorResponse.error(-1, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                    completion(.failure(ErrorResponse.error(-1, nil, dataResponse.response, DecodableRequestBuilderError.emptyDataResponse)))
                     return
                 }
 
                 guard let httpResponse = dataResponse.response else {
-                    completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse)))
+                    completion(.failure(ErrorResponse.error(-2, nil, dataResponse.response, DecodableRequestBuilderError.nilHTTPResponse)))
                     return
                 }
 
@@ -348,7 +348,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 case let .success(decodableObj):
                     completion(.success(Response(response: httpResponse, body: decodableObj)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                    completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, httpResponse, error)))
                 }
                 
             })
diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache
index 0f19cdfbcf9..f8c7072b5a5 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
@@ -167,7 +167,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
                 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
             
         case is Void.Type:
@@ -311,17 +311,17 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
         default:
             
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
             
@@ -353,7 +353,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
index 505aa0dd631..c37f4329e4e 100644
--- a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
+++ b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
@@ -1086,6 +1086,7 @@ definitions:
     xml:
       name: Order
   Category:
+    x-swift-hashable: true
     type: object
     required:
       - name
@@ -1124,6 +1125,7 @@ definitions:
     xml:
       name: User
   Tag:
+    x-swift-hashable: true
     type: object
     properties:
       id:
diff --git a/pom.xml b/pom.xml
index defb35d7add..ff2d86119fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1429,9 +1429,26 @@
                 </property>
             </activation>
             <modules>
+                <!-- swift 5 samples -->
+                <module>samples/client/petstore/swift5/alamofireLibrary</module>
+                <module>samples/client/petstore/swift5/combineLibrary</module>
+                <module>samples/client/petstore/swift5/default</module>
+                <module>samples/client/petstore/swift5/deprecated</module>
+                <module>samples/client/petstore/swift5/nonPublicApi</module>
+                <module>samples/client/petstore/swift5/objcCompatible</module>
+                <module>samples/client/petstore/swift5/promisekitLibrary</module>
+                <module>samples/client/petstore/swift5/readonlyProperties</module>
+                <module>samples/client/petstore/swift5/resultLibrary</module>
+                <module>samples/client/petstore/swift5/rxswiftLibrary</module>
+                <module>samples/client/petstore/swift5/urlsessionLibrary</module>
+                <!-- swift 5 tests -->
+                <module>samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests</module>
+                <module>samples/client/petstore/swift5/combineLibrary/SwaggerClientTests</module>
                 <module>samples/client/petstore/swift5/default/SwaggerClientTests</module>
-                <module>samples/client/petstore/swift5/promisekit/SwaggerClientTests</module>
-                <module>samples/client/petstore/swift5/rxswift/SwaggerClientTests</module>
+                <module>samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests</module>
+                <module>samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests</module>
+                <module>samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests</module>
+                <!-- swift 4 tests -->
                 <module>samples/client/petstore/swift4/default/SwaggerClientTests</module>
                 <module>samples/client/petstore/swift4/promisekit/SwaggerClientTests</module>
                 <module>samples/client/petstore/swift4/rxswift/SwaggerClientTests</module>
diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift
index 368b4edffb9..da15e27a474 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift
@@ -102,7 +102,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
                     self.processRequest(request: upload, managerId, apiResponseQueue, completion)
                 case .failure(let encodingError):
                     apiResponseQueue.async {
-                        completion(.failure(ErrorResponse.error(415, nil, encodingError)))
+                        completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
                     }
                 }
             })
@@ -136,7 +136,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
                 case let .success(value):
                     completion(.success(Response(response: stringResponse.response!, body: value as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error)))
                 }
 
             })
@@ -178,9 +178,9 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
                     completion(.success(Response(response: dataResponse.response!, body: filePath as? T)))
 
                 } catch let requestParserError as DownloadException {
-                    completion(.failure(ErrorResponse.error(400, dataResponse.data, requestParserError)))
+                    completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, requestParserError)))
                 } catch let error {
-                    completion(.failure(ErrorResponse.error(400, dataResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, error)))
                 }
                 return
             })
@@ -192,7 +192,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
                 case .success:
                     completion(.success(Response(response: voidResponse.response!, body: nil)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error)))
                 }
 
             })
@@ -204,7 +204,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
                 case .success:
                     completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error)))
                 }
 
             })
@@ -294,7 +294,7 @@ open class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuild
                 case let .success(value):
                     completion(.success(Response(response: stringResponse.response!, body: value as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error)))
                 }
 
             })
@@ -306,7 +306,7 @@ open class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuild
                 case .success:
                     completion(.success(Response(response: voidResponse.response!, body: nil)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error)))
                 }
 
             })
@@ -318,7 +318,7 @@ open class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuild
                 case .success:
                     completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error)))
+                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error)))
                 }
 
             })
@@ -327,17 +327,17 @@ open class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuild
                 cleanupRequest()
 
                 guard dataResponse.result.isSuccess else {
-                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)))
+                    completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, dataResponse.result.error!)))
                     return
                 }
 
                 guard let data = dataResponse.data, !data.isEmpty else {
-                    completion(.failure(ErrorResponse.error(-1, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                    completion(.failure(ErrorResponse.error(-1, nil, dataResponse.response, DecodableRequestBuilderError.emptyDataResponse)))
                     return
                 }
 
                 guard let httpResponse = dataResponse.response else {
-                    completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse)))
+                    completion(.failure(ErrorResponse.error(-2, nil, dataResponse.response, DecodableRequestBuilderError.nilHTTPResponse)))
                     return
                 }
 
@@ -347,7 +347,7 @@ open class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuild
                 case let .success(decodableObj):
                     completion(.success(Response(response: httpResponse, body: decodableObj)))
                 case let .failure(error):
-                    completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                    completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, httpResponse, error)))
                 }
 
             })
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
index 6bc3f45b544..670c5ca54be 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
@@ -18,7 +18,7 @@ class FileUtils {
         let fileURL = documentsDirectory.appendingPathComponent(fileName)
         guard let data = image.jpegData(compressionQuality: 1) else { return nil }
 
-        //Checks if file exists, removes it if so.
+        // Checks if file exists, removes it if so.
         deleteFile(fileURL: fileURL)
 
         do {
diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
index 6bc3f45b544..670c5ca54be 100644
--- a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
+++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
@@ -18,7 +18,7 @@ class FileUtils {
         let fileURL = documentsDirectory.appendingPathComponent(fileName)
         guard let data = image.jpegData(compressionQuality: 1) else { return nil }
 
-        //Checks if file exists, removes it if so.
+        // Checks if file exists, removes it if so.
         deleteFile(fileURL: fileURL)
 
         do {
diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/FileUtils.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
index 6bc3f45b544..670c5ca54be 100644
--- a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
+++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
@@ -18,7 +18,7 @@ class FileUtils {
         let fileURL = documentsDirectory.appendingPathComponent(fileName)
         guard let data = image.jpegData(compressionQuality: 1) else { return nil }
 
-        //Checks if file exists, removes it if so.
+        // Checks if file exists, removes it if so.
         deleteFile(fileURL: fileURL)
 
         do {
diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/FILES b/samples/client/petstore/swift5/deprecated/.openapi-generator/FILES
index 4959a60cde9..b78ea60c112 100644
--- a/samples/client/petstore/swift5/deprecated/.openapi-generator/FILES
+++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/FILES
@@ -15,8 +15,6 @@ PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
 PetstoreClient/Classes/OpenAPIs/Models.swift
 PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
 PetstoreClient/Classes/OpenAPIs/Models/Category.swift
-PetstoreClient/Classes/OpenAPIs/Models/InlineObject.swift
-PetstoreClient/Classes/OpenAPIs/Models/InlineObject1.swift
 PetstoreClient/Classes/OpenAPIs/Models/Order.swift
 PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
 PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -27,8 +25,6 @@ PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
 README.md
 docs/ApiResponse.md
 docs/Category.md
-docs/InlineObject.md
-docs/InlineObject1.md
 docs/Order.md
 docs/Pet.md
 docs/PetAPI.md
diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/deprecated/README.md b/samples/client/petstore/swift5/deprecated/README.md
index 62088c981e2..619c4036f44 100644
--- a/samples/client/petstore/swift5/deprecated/README.md
+++ b/samples/client/petstore/swift5/deprecated/README.md
@@ -51,8 +51,6 @@ Class | Method | HTTP request | Description
 
  - [ApiResponse](docs/ApiResponse.md)
  - [Category](docs/Category.md)
- - [InlineObject](docs/InlineObject.md)
- - [InlineObject1](docs/InlineObject1.md)
  - [Order](docs/Order.md)
  - [Pet](docs/Pet.md)
  - [Tag](docs/Tag.md)
diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift
index 6089ac67d0d..f372f83aac8 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 internal enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 internal enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 81fd6dcc6e8..3b4f6c149fa 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-internal struct Category: Codable {
+internal struct Category: Codable, Hashable {
 
     internal var id: Int64?
     internal var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 9ef32df964c..8b4501e67aa 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-internal struct Tag: Codable {
+internal struct Tag: Codable, Hashable {
 
     internal var id: Int64?
     internal var name: String?
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index a165d52ff06..5c97a2b5713 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ internal class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionReques
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ internal class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionReques
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ internal class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionReques
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 0e034abbf72..a69d5c26afd 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc public class Category: NSObject, Codable {
+@objc public class Category: NSObject, Codable, Hashable {
 
     public var _id: Int64?
     public var _idNum: NSNumber? {
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index fc02765d30e..d3aefb0946c 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc public class Tag: NSObject, Codable {
+@objc public class Tag: NSObject, Codable, Hashable {
 
     public var _id: Int64?
     public var _idNum: NSNumber? {
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 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
index 6bc3f45b544..670c5ca54be 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
@@ -18,7 +18,7 @@ class FileUtils {
         let fileURL = documentsDirectory.appendingPathComponent(fileName)
         guard let data = image.jpegData(compressionQuality: 1) else { return nil }
 
-        //Checks if file exists, removes it if so.
+        // Checks if file exists, removes it if so.
         deleteFile(fileURL: fileURL)
 
         do {
diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index e00b87b4acc..4089925077f 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public private(set) var id: Int64?
     public private(set) var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 08c29fb3f36..c35e07111a0 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public private(set) var id: Int64?
     public private(set) var name: String?
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
index 6bc3f45b544..670c5ca54be 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
@@ -18,7 +18,7 @@ class FileUtils {
         let fileURL = documentsDirectory.appendingPathComponent(fileName)
         guard let data = image.jpegData(compressionQuality: 1) else { return nil }
 
-        //Checks if file exists, removes it if so.
+        // Checks if file exists, removes it if so.
         deleteFile(fileURL: fileURL)
 
         do {
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION
index d99e7162d01..3fa3b389a57 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+5.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
index c0542c14c08..96e26a20f7d 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift
@@ -11,7 +11,7 @@ protocol JSONEncodable {
 }
 
 public enum ErrorResponse: Error {
-    case error(Int, Data?, Error)
+    case error(Int, Data?, URLResponse?, Error)
 }
 
 public enum DownloadException: Error {
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index faf66b272a4..6a19bb02d0d 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Category: Codable {
+public struct Category: Codable, Hashable {
 
     public var id: Int64?
     public var name: String = "default-name"
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 82c02f04b69..8b8e24fc39c 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-public struct Tag: Codable {
+public struct Tag: Codable, Hashable {
 
     public var id: Int64?
     public var name: String?
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 8bbaba9b4d9..e1bc654b3bc 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -167,7 +167,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
-                completion(.failure(ErrorResponse.error(415, nil, error)))
+                completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
 
@@ -176,17 +176,17 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -227,9 +227,9 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
 
             } catch let requestParserError as DownloadException {
-                completion(.failure(ErrorResponse.error(400, data, requestParserError)))
+                completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
-                completion(.failure(ErrorResponse.error(400, data, error)))
+                completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
 
         case is Void.Type:
@@ -311,17 +311,17 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
-            completion(.failure(ErrorResponse.error(-1, data, error)))
+            completion(.failure(ErrorResponse.error(-1, data, response, error)))
             return
         }
 
         guard let httpResponse = response as? HTTPURLResponse else {
-            completion(.failure(ErrorResponse.error(-2, data, DecodableRequestBuilderError.nilHTTPResponse)))
+            completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse)))
             return
         }
 
         guard httpResponse.isStatusCodeSuccessful else {
-            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
+            completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode)))
             return
         }
 
@@ -343,7 +343,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
         default:
 
             guard let data = data, !data.isEmpty else {
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
 
@@ -353,7 +353,7 @@ open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBui
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
             case let .failure(error):
-                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error)))
+                completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error)))
             }
         }
     }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
index 6bc3f45b544..670c5ca54be 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/FileUtils.swift
@@ -18,7 +18,7 @@ class FileUtils {
         let fileURL = documentsDirectory.appendingPathComponent(fileName)
         guard let data = image.jpegData(compressionQuality: 1) else { return nil }
 
-        //Checks if file exists, removes it if so.
+        // Checks if file exists, removes it if so.
         deleteFile(fileURL: fileURL)
 
         do {
-- 
GitLab


From 7d6063d05cc29ad89023cd8e53b78c53e0581271 Mon Sep 17 00:00:00 2001
From: Justin Black <spacether@users.noreply.github.com>
Date: Tue, 29 Dec 2020 08:13:36 -0800
Subject: [PATCH 06/28] Revert "Fixes issue 8052: Stackoverflow in
 toExampleValue() for python client (#8054)" (#8293)

This reverts commit fd02bc3d848d3a6a27bdec7469f13ada430b4e81.
---
 .../languages/PythonClientCodegen.java        | 55 ++----------
 .../codegen/python/PythonClientTest.java      | 39 ---------
 .../3_0/issue_8052_recursive_model.yaml       | 83 -------------------
 ...ue_8052_recursive_model_expected_value.txt |  9 --
 4 files changed, 9 insertions(+), 177 deletions(-)
 delete mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml
 delete mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
index 534c5248293..2a84a4fb6cd 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
@@ -16,7 +16,6 @@
 
 package org.openapitools.codegen.languages;
 
-import com.google.common.collect.Sets;
 import io.swagger.v3.core.util.Json;
 import io.swagger.v3.oas.models.media.*;
 import io.swagger.v3.oas.models.media.ArraySchema;
@@ -880,7 +879,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
 
     public String toExampleValue(Schema schema, Object objExample) {
         String modelName = getModelName(schema);
-        return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0, Sets.newHashSet());
+        return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0);
     }
 
     private Boolean simpleStringSchema(Schema schema) {
@@ -926,12 +925,9 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
      *                    ModelName( line 0
      *                        some_property='some_property_example' line 1
      *                    ) line 2
-     * @param seenSchemas This set contains all the schemas passed into the recursive function. It is used to check
-     *                    if a schema was already passed into the function and breaks the infinite recursive loop. The
-     *                    only schemas that are not added are ones that contain $ref != null
      * @return the string example
      */
-    private String toExampleValueRecursive(String modelName, Schema schema, Object objExample, int indentationLevel, String prefix, Integer exampleLine, Set<Schema> seenSchemas) {
+    private String toExampleValueRecursive(String modelName, Schema schema, Object objExample, int indentationLevel, String prefix, Integer exampleLine) {
         final String indentionConst = "    ";
         String currentIndentation = "";
         String closingIndentation = "";
@@ -955,27 +951,6 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
         if (objExample != null) {
             example = objExample.toString();
         }
-        // checks if the current schema has already been passed in. If so, breaks the current recursive pass
-        if (seenSchemas.contains(schema)){
-            if (modelName != null) {
-                return fullPrefix + modelName + closeChars;
-            } else {
-                // this is a recursive schema
-                // need to add a reasonable example to avoid
-                // infinite recursion
-                if(ModelUtils.isNullable(schema)) {
-                    // if the schema is nullable, then 'None' is a valid value
-                    return fullPrefix + "None" + closeChars;
-                } else if(ModelUtils.isArraySchema(schema)) {
-                    // the schema is an array, add an empty array
-                    return fullPrefix + "[]" + closeChars;
-                } else {
-                    // the schema is an object, make an empty object
-                    return fullPrefix + "{}" + closeChars;
-                }
-            }
-        }
-
         if (null != schema.get$ref()) {
             Map<String, Schema> allDefinitions = ModelUtils.getSchemas(this.openAPI);
             String ref = ModelUtils.getSimpleRef(schema.get$ref());
@@ -985,7 +960,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                 return fullPrefix + "None" + closeChars;
             }
             String refModelName = getModelName(schema);
-            return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas);
+            return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine);
         } else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) {
             // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
             // though this tooling supports it.
@@ -1083,8 +1058,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
             ArraySchema arrayschema = (ArraySchema) schema;
             Schema itemSchema = arrayschema.getItems();
             String itemModelName = getModelName(itemSchema);
-            seenSchemas.add(schema);
-            example = fullPrefix + "[" + "\n" + toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1, seenSchemas) + ",\n" + closingIndentation + "]" + closeChars;
+            example = fullPrefix + "[" + "\n" + toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1) + ",\n" + closingIndentation + "]" + closeChars;
             return example;
         } else if (ModelUtils.isMapSchema(schema)) {
             if (modelName == null) {
@@ -1106,8 +1080,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                     addPropPrefix = ensureQuotes(key) + ": ";
                 }
                 String addPropsModelName = getModelName(addPropsSchema);
-                seenSchemas.add(schema);
-                example = fullPrefix + "\n" + toExampleValueRecursive(addPropsModelName, addPropsSchema, addPropsExample, indentationLevel + 1, addPropPrefix, exampleLine + 1, seenSchemas) + ",\n" + closingIndentation + closeChars;
+                example = fullPrefix + "\n" + toExampleValueRecursive(addPropsModelName, addPropsSchema, addPropsExample, indentationLevel + 1, addPropPrefix, exampleLine + 1) + ",\n" + closingIndentation + closeChars;
             } else {
                 example = fullPrefix + closeChars;
             }
@@ -1130,12 +1103,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                     return fullPrefix + closeChars;
                 }
             }
-            // Adds schema to seenSchemas before running example model function. romoves schema after running
-            // the function. It also doesnt keep track of any schemas within the ObjectModel.
-            seenSchemas.add(schema);
-            String exampleForObjectModel = exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation, seenSchemas);
-            seenSchemas.remove(schema);
-            return exampleForObjectModel;
+            return exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation);
         } else if (ModelUtils.isComposedSchema(schema)) {
             // TODO add examples for composed schema models without discriminators
 
@@ -1149,12 +1117,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                     CodegenProperty cp = new CodegenProperty();
                     cp.setName(disc.getPropertyName());
                     cp.setExample(discPropNameValue);
-                    // Adds schema to seenSchemas before running example model function. romoves schema after running
-                    // the function. It also doesnt keep track of any schemas within the ObjectModel.
-                    seenSchemas.add(modelSchema);
-                    String exampleForObjectModel = exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, seenSchemas);
-                    seenSchemas.remove(modelSchema);
-                    return exampleForObjectModel;
+                    return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation);
                 } else {
                     return fullPrefix + closeChars;
                 }
@@ -1167,7 +1130,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
         return example;
     }
 
-    private String exampleForObjectModel(Schema schema, String fullPrefix, String closeChars, CodegenProperty discProp, int indentationLevel, int exampleLine, String closingIndentation, Set<Schema> seenSchemas) {
+    private String exampleForObjectModel(Schema schema, String fullPrefix, String closeChars, CodegenProperty discProp, int indentationLevel, int exampleLine, String closingIndentation) {
         Map<String, Schema> requiredAndOptionalProps = schema.getProperties();
         if (requiredAndOptionalProps == null || requiredAndOptionalProps.isEmpty()) {
             return fullPrefix + closeChars;
@@ -1187,7 +1150,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
                 propModelName = getModelName(propSchema);
                 propExample = exampleFromStringOrArraySchema(propSchema, null, propName);
             }
-            example += toExampleValueRecursive(propModelName, propSchema, propExample, indentationLevel + 1, propName + "=", exampleLine + 1, seenSchemas) + ",\n";
+            example += toExampleValueRecursive(propModelName, propSchema, propExample, indentationLevel + 1, propName + "=", exampleLine + 1) + ",\n";
         }
         // TODO handle additionalProperties also
         example += closingIndentation + closeChars;
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java
index 6c46b6b6117..683d4aa4b02 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java
@@ -15,18 +15,6 @@
  */
 
 package org.openapitools.codegen.python;
-import com.google.common.io.Resources;
-import io.swagger.v3.oas.models.PathItem;
-import io.swagger.v3.oas.models.Paths;
-import io.swagger.v3.oas.models.parameters.RequestBody;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.nio.charset.StandardCharsets;
-import javax.validation.constraints.AssertTrue;
-import org.apache.commons.io.IOUtils;
 import org.openapitools.codegen.config.CodegenConfigurator;
 
 import com.google.common.collect.Sets;
@@ -45,7 +33,6 @@ import org.openapitools.codegen.*;
 import org.openapitools.codegen.languages.PythonClientCodegen;
 import org.openapitools.codegen.utils.ModelUtils;
 import org.testng.Assert;
-import org.testng.TestNGAntTask.Mode;
 import org.testng.annotations.Test;
 
 @SuppressWarnings("static-method")
@@ -438,30 +425,4 @@ public class PythonClientTest {
         final CodegenModel model = codegen.fromModel(modelName, modelSchema);
         Assert.assertEquals((int) model.getMinProperties(), 1);
     }
-
-    @Test(description = "tests RecursiveToExample")
-    public void testRecursiveToExample() throws IOException {
-        final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_8052_recursive_model.yaml");
-        final PythonClientCodegen codegen = new PythonClientCodegen();
-        codegen.setOpenAPI(openAPI);
-
-        final Operation operation = openAPI.getPaths().get("/geojson").getPost();
-        Schema schema = ModelUtils.getSchemaFromRequestBody(operation.getRequestBody());
-        String exampleValue = codegen.toExampleValue(schema, null);
-
-        // uncomment if you need to regenerate the expected value
-        //        PrintWriter printWriter = new PrintWriter("src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt");
-        //        printWriter.write(exampleValue);
-        //        printWriter.close();
-        //        org.junit.Assert.assertTrue(false);
-
-        String expectedValue = Resources.toString(
-                Resources.getResource("3_0/issue_8052_recursive_model_expected_value.txt"),
-                StandardCharsets.UTF_8);
-
-
-        Assert.assertEquals(expectedValue.trim(), exampleValue.trim());
-
-    }
-
 }
diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml
deleted file mode 100644
index 6d833b29211..00000000000
--- a/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model.yaml
+++ /dev/null
@@ -1,83 +0,0 @@
-openapi: 3.0.0
-info:
-  version: 01.01.00
-  title: APITest API documentation.
-  termsOfService: http://api.apitest.com/party/tos/
-servers:
-  - url: https://api.apitest.com/v1
-paths:
-  /geojson:
-    post:
-      summary: Add a GeoJson Object
-      operationId: post-geojson
-      responses:
-        '201':
-          description: Created
-          content:
-            application/json:
-              schema:
-                type: string
-                description: GeoJson ID
-        '400':
-          description: Bad Request
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/GeoJsonGeometry'
-      parameters: []
-components:
-  schemas:
-    GeoJsonGeometry:
-      title: GeoJsonGeometry
-      description: GeoJSON geometry
-      oneOf:
-        - $ref: '#/components/schemas/Point'
-        - $ref: '#/components/schemas/GeometryCollection'
-      discriminator:
-        propertyName: type
-        mapping:
-          Point: '#/components/schemas/Point'
-          GeometryCollection: '#/components/schemas/GeometryCollection'
-      externalDocs:
-        url: http://geojson.org/geojson-spec.html#geometry-objects
-    Point:
-      title: Point
-      type: object
-      description: GeoJSON geometry
-      externalDocs:
-        url: http://geojson.org/geojson-spec.html#id2
-      properties:
-        coordinates:
-          title: Point3D
-          type: array
-          description: Point in 3D space
-          externalDocs:
-            url: http://geojson.org/geojson-spec.html#id2
-          minItems: 2
-          maxItems: 3
-          items:
-            type: number
-            format: double
-        type:
-          type: string
-          default: Point
-      required:
-        - type
-    GeometryCollection:
-      title: GeometryCollection
-      type: object
-      description: GeoJSon geometry collection
-      required:
-        - type
-        - geometries
-      externalDocs:
-        url: http://geojson.org/geojson-spec.html#geometrycollection
-      properties:
-        type:
-          type: string
-          default: GeometryCollection
-        geometries:
-          type: array
-          items:
-            $ref: '#/components/schemas/GeoJsonGeometry'
diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt b/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt
deleted file mode 100644
index 98ef62651fb..00000000000
--- a/modules/openapi-generator/src/test/resources/3_0/issue_8052_recursive_model_expected_value.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-GeoJsonGeometry(
-        type="GeometryCollection",
-        geometries=[
-            GeoJsonGeometry(
-                type="GeometryCollection",
-                geometries=[],
-            ),
-        ],
-    )
\ No newline at end of file
-- 
GitLab


From 566e7ef5832706e0404ccbde87128d17aeb4a42e Mon Sep 17 00:00:00 2001
From: Josh Goldberg <me@joshuakgoldberg.com>
Date: Wed, 30 Dec 2020 04:32:40 -0500
Subject: [PATCH 07/28] Fix two spaces after get headers() in typescript-fetch
 (#8294)

---
 .../src/main/resources/typescript-fetch/runtime.mustache        | 2 +-
 .../petstore/typescript-fetch/builds/default-v3.0/runtime.ts    | 2 +-
 .../client/petstore/typescript-fetch/builds/default/runtime.ts  | 2 +-
 samples/client/petstore/typescript-fetch/builds/enum/runtime.ts | 2 +-
 .../petstore/typescript-fetch/builds/es6-target/src/runtime.ts  | 2 +-
 .../typescript-fetch/builds/multiple-parameters/runtime.ts      | 2 +-
 .../builds/prefix-parameter-interfaces/src/runtime.ts           | 2 +-
 .../builds/typescript-three-plus/src/runtime.ts                 | 2 +-
 .../petstore/typescript-fetch/builds/with-interfaces/runtime.ts | 2 +-
 .../typescript-fetch/builds/with-npm-version/src/runtime.ts     | 2 +-
 .../builds/without-runtime-checks/src/runtime.ts                | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache
index 767a3488080..04001417a82 100644
--- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache
@@ -172,7 +172,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts
index 90eb50c42a1..f84920e94e3 100644
--- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts
index 4dfeb54d840..533e9912b14 100644
--- a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts
index 8fae3715d1b..3e18bd1692c 100644
--- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts
index 747ca17e206..87070cedb4c 100644
--- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts
+++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts
@@ -183,7 +183,7 @@ export class Configuration {
         return undefined;
     }
 
-    get headers():  HTTPHeaders | undefined {
+    get headers(): HTTPHeaders | undefined {
         return this.configuration.headers;
     }
 
-- 
GitLab


From de3ec75b115cb5330f9de140768c481219eec1d8 Mon Sep 17 00:00:00 2001
From: Tatsuro Shibamura <me@shibayan.jp>
Date: Mon, 4 Jan 2021 10:52:07 +0900
Subject: [PATCH 08/28] [csharp-netcore] Fixed ApiClient code generation not
 respecting modelPackage settings (#8272)

---
 .../src/main/resources/csharp-netcore/ApiClient.mustache    | 6 +++---
 1 file changed, 3 insertions(+), 3 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 504b5a22439..c1d025d7f03 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache
@@ -65,10 +65,10 @@ namespace {{packageName}}.Client
         /// <returns>A JSON string.</returns>
         public string Serialize(object obj)
         {
-            if (obj != null && obj is {{{packageName}}}.Model.AbstractOpenAPISchema)
+            if (obj != null && obj is {{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)
             {
                 // the object to be serialized is an oneOf/anyOf schema
-                return (({{{packageName}}}.Model.AbstractOpenAPISchema)obj).ToJson();
+                return (({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)obj).ToJson();
             }
             else
             {
@@ -576,7 +576,7 @@ namespace {{packageName}}.Client
             }
 
             // if the response type is oneOf/anyOf, call FromJSON to deserialize the data
-            if (typeof({{{packageName}}}.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
+            if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
             {
                 T instance = (T)Activator.CreateInstance(typeof(T));
                 MethodInfo method = typeof(T).GetMethod("FromJson");
-- 
GitLab


From 14efb8c70f8a1c1dcd0247d3b47a09012930c06c Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Mon, 4 Jan 2021 01:55:23 +0000
Subject: [PATCH 09/28] [swift 5] update dependencies (#8277)

---
 .../src/main/resources/swift5/Cartfile.mustache        |  4 ++--
 .../src/main/resources/swift5/Podspec.mustache         |  4 ++--
 .../client/petstore/swift5/promisekitLibrary/Cartfile  |  2 +-
 .../swift5/promisekitLibrary/PetstoreClient.podspec    |  2 +-
 .../promisekitLibrary/SwaggerClientTests/Podfile.lock  | 10 +++++-----
 samples/client/petstore/swift5/rxswiftLibrary/Cartfile |  2 +-
 .../swift5/rxswiftLibrary/PetstoreClient.podspec       |  2 +-
 .../rxswiftLibrary/SwaggerClientTests/Podfile.lock     | 10 +++++-----
 8 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache
index 9c30d7413b9..3f6269c23ab 100644
--- a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache
@@ -1,3 +1,3 @@
 {{#useAlamofire}}github "Alamofire/Alamofire" ~> 4.9.1{{/useAlamofire}}{{#usePromiseKit}}
-github "mxcl/PromiseKit" ~> 6.12.0{{/usePromiseKit}}{{#useRxSwift}}
-github "ReactiveX/RxSwift" ~> 5.0.1{{/useRxSwift}}
+github "mxcl/PromiseKit" ~> 6.13.1{{/usePromiseKit}}{{#useRxSwift}}
+github "ReactiveX/RxSwift" ~> 5.1.1{{/useRxSwift}}
diff --git a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache
index e25eab49911..c0539662ce7 100644
--- a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache
@@ -27,10 +27,10 @@ Pod::Spec.new do |s|
   {{/podDocumentationURL}}
   s.source_files = '{{projectName}}/Classes/**/*.swift'
   {{#usePromiseKit}}
-  s.dependency 'PromiseKit/CorePromise', '~> 6.12.0'
+  s.dependency 'PromiseKit/CorePromise', '~> 6.13.1'
   {{/usePromiseKit}}
   {{#useRxSwift}}
-  s.dependency 'RxSwift', '~> 5.0.0'
+  s.dependency 'RxSwift', '~> 5.1.1'
   {{/useRxSwift}}
   {{#useAlamofire}}
   s.dependency 'Alamofire', '~> 4.9.1'
diff --git a/samples/client/petstore/swift5/promisekitLibrary/Cartfile b/samples/client/petstore/swift5/promisekitLibrary/Cartfile
index 01fd3663de5..9a00bb83e5b 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/Cartfile
+++ b/samples/client/petstore/swift5/promisekitLibrary/Cartfile
@@ -1,2 +1,2 @@
 
-github "mxcl/PromiseKit" ~> 6.12.0
+github "mxcl/PromiseKit" ~> 6.13.1
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec
index ef330727bff..92e54fcfeb7 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec
@@ -11,5 +11,5 @@ Pod::Spec.new do |s|
   s.homepage = 'https://github.com/openapitools/openapi-generator'
   s.summary = 'PetstoreClient'
   s.source_files = 'PetstoreClient/Classes/**/*.swift'
-  s.dependency 'PromiseKit/CorePromise', '~> 6.12.0'
+  s.dependency 'PromiseKit/CorePromise', '~> 6.13.1'
 end
diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock
index 9e4fdf68367..c75f76b2fb8 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock
+++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock
@@ -1,7 +1,7 @@
 PODS:
   - PetstoreClient (1.0.0):
-    - PromiseKit/CorePromise (~> 6.12.0)
-  - PromiseKit/CorePromise (6.12.0)
+    - PromiseKit/CorePromise (~> 6.13.1)
+  - PromiseKit/CorePromise (6.13.1)
 
 DEPENDENCIES:
   - PetstoreClient (from `../`)
@@ -15,9 +15,9 @@ EXTERNAL SOURCES:
     :path: "../"
 
 SPEC CHECKSUMS:
-  PetstoreClient: 97929409c1dd42edb2cf067b2cc182434d87f1aa
-  PromiseKit: c06835ba442ce5454ce3cdde470232804a6e4ff8
+  PetstoreClient: bf095c434cf89014d1b574779fcc7701a551fcce
+  PromiseKit: 28fda91c973cc377875d8c0ea4f973013c05b6db
 
 PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c
 
-COCOAPODS: 1.9.0
+COCOAPODS: 1.10.0
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile
index 72cbede9599..37dea8f2ead 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile
+++ b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile
@@ -1,2 +1,2 @@
 
-github "ReactiveX/RxSwift" ~> 5.0.1
+github "ReactiveX/RxSwift" ~> 5.1.1
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec
index 76ab70698e0..2e94d8a71f3 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec
@@ -11,5 +11,5 @@ Pod::Spec.new do |s|
   s.homepage = 'https://github.com/openapitools/openapi-generator'
   s.summary = 'PetstoreClient'
   s.source_files = 'PetstoreClient/Classes/**/*.swift'
-  s.dependency 'RxSwift', '~> 5.0.0'
+  s.dependency 'RxSwift', '~> 5.1.1'
 end
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock
index 843ccc1723e..be3757ec1f4 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock
+++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock
@@ -1,7 +1,7 @@
 PODS:
   - PetstoreClient (1.0.0):
-    - RxSwift (~> 5.0.0)
-  - RxSwift (5.0.1)
+    - RxSwift (~> 5.1.1)
+  - RxSwift (5.1.1)
 
 DEPENDENCIES:
   - PetstoreClient (from `../`)
@@ -15,9 +15,9 @@ EXTERNAL SOURCES:
     :path: "../"
 
 SPEC CHECKSUMS:
-  PetstoreClient: ca66372305d63921e72f65b3de84aeb705eba5a1
-  RxSwift: e2dc62b366a3adf6a0be44ba9f405efd4c94e0c4
+  PetstoreClient: f3d073d9543d90440a155feec649c16b98d84c31
+  RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178
 
 PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c
 
-COCOAPODS: 1.9.0
+COCOAPODS: 1.10.0
-- 
GitLab


From 72d6cff1881b2e5c3ca67ac1965105729c03e0cb Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Mon, 4 Jan 2021 01:55:59 +0000
Subject: [PATCH 10/28] iOS - fix XcodeGen deploy target to match cocoapods
 (#8279)

---
 .../src/main/resources/swift5/XcodeGen.mustache                 | 2 +-
 samples/client/petstore/swift5/alamofireLibrary/project.yml     | 2 +-
 samples/client/petstore/swift5/combineLibrary/project.yml       | 2 +-
 samples/client/petstore/swift5/default/project.yml              | 2 +-
 samples/client/petstore/swift5/deprecated/project.yml           | 2 +-
 samples/client/petstore/swift5/nonPublicApi/project.yml         | 2 +-
 samples/client/petstore/swift5/objcCompatible/project.yml       | 2 +-
 samples/client/petstore/swift5/promisekitLibrary/project.yml    | 2 +-
 samples/client/petstore/swift5/readonlyProperties/project.yml   | 2 +-
 samples/client/petstore/swift5/resultLibrary/project.yml        | 2 +-
 samples/client/petstore/swift5/rxswiftLibrary/project.yml       | 2 +-
 samples/client/petstore/swift5/urlsessionLibrary/project.yml    | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache
index 3b57c69e104..a81137ae138 100644
--- a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache
@@ -3,7 +3,7 @@ targets:
   {{projectName}}:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [{{projectName}}]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/alamofireLibrary/project.yml b/samples/client/petstore/swift5/alamofireLibrary/project.yml
index 148b42517be..08035907b99 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/project.yml
+++ b/samples/client/petstore/swift5/alamofireLibrary/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/combineLibrary/project.yml b/samples/client/petstore/swift5/combineLibrary/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/combineLibrary/project.yml
+++ b/samples/client/petstore/swift5/combineLibrary/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/default/project.yml b/samples/client/petstore/swift5/default/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/default/project.yml
+++ b/samples/client/petstore/swift5/default/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/deprecated/project.yml b/samples/client/petstore/swift5/deprecated/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/deprecated/project.yml
+++ b/samples/client/petstore/swift5/deprecated/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/nonPublicApi/project.yml b/samples/client/petstore/swift5/nonPublicApi/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/nonPublicApi/project.yml
+++ b/samples/client/petstore/swift5/nonPublicApi/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/objcCompatible/project.yml b/samples/client/petstore/swift5/objcCompatible/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/objcCompatible/project.yml
+++ b/samples/client/petstore/swift5/objcCompatible/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/promisekitLibrary/project.yml b/samples/client/petstore/swift5/promisekitLibrary/project.yml
index 3f6d4d9253e..d6d2be8a224 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/project.yml
+++ b/samples/client/petstore/swift5/promisekitLibrary/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/readonlyProperties/project.yml b/samples/client/petstore/swift5/readonlyProperties/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/readonlyProperties/project.yml
+++ b/samples/client/petstore/swift5/readonlyProperties/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/resultLibrary/project.yml b/samples/client/petstore/swift5/resultLibrary/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/resultLibrary/project.yml
+++ b/samples/client/petstore/swift5/resultLibrary/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/project.yml b/samples/client/petstore/swift5/rxswiftLibrary/project.yml
index 667956cb12a..60393c28e66 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/project.yml
+++ b/samples/client/petstore/swift5/rxswiftLibrary/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/project.yml b/samples/client/petstore/swift5/urlsessionLibrary/project.yml
index 892005fdd5a..8e7102001b8 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/project.yml
+++ b/samples/client/petstore/swift5/urlsessionLibrary/project.yml
@@ -3,7 +3,7 @@ targets:
   PetstoreClient:
     type: framework
     platform: iOS
-    deploymentTarget: "10.0"
+    deploymentTarget: "9.0"
     sources: [PetstoreClient]
     info:
       path: ./Info.plist
-- 
GitLab


From 163c70e7d8b112fac3b1f752f5fc5ef2edb5aba5 Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Mon, 4 Jan 2021 02:03:26 +0000
Subject: [PATCH 11/28] [Swift 5] create sample for URLSsession and Alamofire
 bearer authentication (#8302)

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with Alamofire

* [swift] create a sample of bearer token authentication with Alamofire
---
 .../SwaggerClientTests/Podfile.lock           |   2 +-
 .../SwaggerClient.xcodeproj/project.pbxproj   | 107 ++++++-------
 .../SwaggerClient/AppDelegate.swift           |   5 +
 .../BearerDecodableRequestBuilder.swift       |  79 ++++++++++
 .../SwaggerClient.xcodeproj/project.pbxproj   |   4 +
 .../SwaggerClient/AppDelegate.swift           |   5 +
 .../BearerDecodableRequestBuilder.swift       | 144 ++++++++++++++++++
 7 files changed, 294 insertions(+), 52 deletions(-)
 create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift
 create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift

diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock
index 5ded1f78890..30f84a6b9c3 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock
+++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock
@@ -20,4 +20,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c
 
-COCOAPODS: 1.9.0
+COCOAPODS: 1.10.0
diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
index c9ad0385970..901182fb107 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
+++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
@@ -7,8 +7,8 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		198019EEC6E3CB01FC884C7A /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D829DFE4E137D91D6174D75A /* Pods_SwaggerClientTests.framework */; };
 		1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */; };
-		23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */; };
 		6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; };
 		6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; };
 		6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; };
@@ -17,9 +17,10 @@
 		6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; };
 		6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; };
 		6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; };
+		A5465873259E306E00C3929B /* BearerDecodableRequestBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5465872259E306E00C3929B /* BearerDecodableRequestBuilder.swift */; };
 		A5EA12542419387200E30FC3 /* FileUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EA12522419387100E30FC3 /* FileUtils.swift */; };
 		A5EA12552419387200E30FC3 /* UIImage+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EA12532419387100E30FC3 /* UIImage+Extras.swift */; };
-		FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; };
+		B68489033454646C60C16C88 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79549D5237E5E83F567030EC /* Pods_SwaggerClient.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -33,8 +34,8 @@
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
-		081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = "<group>"; };
 		1A501F47219C3DC600F372F6 /* DateFormatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatTests.swift; sourceTree = "<group>"; };
+		32ED0E88E0B89A537075D9C9 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = "<group>"; };
 		6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -47,14 +48,15 @@
 		6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = "<group>"; };
 		6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = "<group>"; };
 		6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = "<group>"; };
-		7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		74246FD63841F7C179AD697F /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = "<group>"; };
+		79549D5237E5E83F567030EC /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		8ABA6AE59F792DAA1F79C48F /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
+		A5465872259E306E00C3929B /* BearerDecodableRequestBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BearerDecodableRequestBuilder.swift; sourceTree = "<group>"; };
 		A5EA12522419387100E30FC3 /* FileUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileUtils.swift; sourceTree = "<group>"; };
 		A5EA12532419387100E30FC3 /* UIImage+Extras.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Extras.swift"; sourceTree = "<group>"; };
-		ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
 		C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = "<group>"; };
-		ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
+		D829DFE4E137D91D6174D75A /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		FB503FF47F354A87D697DD0A /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -62,7 +64,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */,
+				B68489033454646C60C16C88 /* Pods_SwaggerClient.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -70,30 +72,19 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */,
+				198019EEC6E3CB01FC884C7A /* Pods_SwaggerClientTests.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		203D4495376E4EB72474B091 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */,
-				ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */,
-				E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */,
-				ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */,
-			);
-			name = Pods;
-			sourceTree = "<group>";
-		};
 		3FABC56EC0BA84CBF4F99564 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
 				C07EC0A94AA0F86D60668B32 /* Pods.framework */,
-				7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */,
-				83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */,
+				79549D5237E5E83F567030EC /* Pods_SwaggerClient.framework */,
+				D829DFE4E137D91D6174D75A /* Pods_SwaggerClientTests.framework */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";
@@ -105,7 +96,7 @@
 				6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */,
 				6D4EFB921C692C6300B96B06 /* Products */,
 				3FABC56EC0BA84CBF4F99564 /* Frameworks */,
-				203D4495376E4EB72474B091 /* Pods */,
+				AC485EA5DC51CA28F3F7FECF /* Pods */,
 			);
 			sourceTree = "<group>";
 		};
@@ -123,6 +114,7 @@
 			children = (
 				6D4EFB941C692C6300B96B06 /* AppDelegate.swift */,
 				6D4EFB961C692C6300B96B06 /* ViewController.swift */,
+				A5465872259E306E00C3929B /* BearerDecodableRequestBuilder.swift */,
 				6D4EFB981C692C6300B96B06 /* Main.storyboard */,
 				6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */,
 				6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */,
@@ -145,6 +137,18 @@
 			path = SwaggerClientTests;
 			sourceTree = "<group>";
 		};
+		AC485EA5DC51CA28F3F7FECF /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				32ED0E88E0B89A537075D9C9 /* Pods-SwaggerClient.debug.xcconfig */,
+				FB503FF47F354A87D697DD0A /* Pods-SwaggerClient.release.xcconfig */,
+				74246FD63841F7C179AD697F /* Pods-SwaggerClientTests.debug.xcconfig */,
+				8ABA6AE59F792DAA1F79C48F /* Pods-SwaggerClientTests.release.xcconfig */,
+			);
+			name = Pods;
+			path = Pods;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -152,11 +156,11 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */;
 			buildPhases = (
-				5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */,
+				53EC90CFFB0E0FABA75F972D /* [CP] Check Pods Manifest.lock */,
 				6D4EFB8D1C692C6300B96B06 /* Sources */,
 				6D4EFB8E1C692C6300B96B06 /* Frameworks */,
 				6D4EFB8F1C692C6300B96B06 /* Resources */,
-				FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */,
+				3E0F8DF721D95AAFC75864D4 /* [CP] Embed Pods Frameworks */,
 			);
 			buildRules = (
 			);
@@ -171,7 +175,7 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */;
 			buildPhases = (
-				EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */,
+				89F684025365A60C007C7DA9 /* [CP] Check Pods Manifest.lock */,
 				6D4EFBA11C692C6300B96B06 /* Sources */,
 				6D4EFBA21C692C6300B96B06 /* Frameworks */,
 				6D4EFBA31C692C6300B96B06 /* Resources */,
@@ -247,29 +251,27 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-		5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */ = {
+		3E0F8DF721D95AAFC75864D4 /* [CP] Embed Pods Frameworks */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
-			inputFileListPaths = (
-			);
 			inputPaths = (
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
-				"${PODS_ROOT}/Manifest.lock",
-			);
-			name = "[CP] Check Pods Manifest.lock";
-			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh",
+				"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
+				"${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework",
 			);
+			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */ = {
+		53EC90CFFB0E0FABA75F972D /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
@@ -284,31 +286,33 @@
 			outputFileListPaths = (
 			);
 			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt",
+				"$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
 			showEnvVarsInLog = 0;
 		};
-		FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */ = {
+		89F684025365A60C007C7DA9 /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
+			inputFileListPaths = (
+			);
 			inputPaths = (
-				"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh",
-				"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
-				"${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework",
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputFileListPaths = (
 			);
-			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework",
+				"$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
 			showEnvVarsInLog = 0;
 		};
 /* End PBXShellScriptBuildPhase section */
@@ -319,6 +323,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */,
+				A5465873259E306E00C3929B /* BearerDecodableRequestBuilder.swift in Sources */,
 				6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -476,7 +481,7 @@
 		};
 		6D4EFBAF1C692C6300B96B06 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */;
+			baseConfigurationReference = 32ED0E88E0B89A537075D9C9 /* Pods-SwaggerClient.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				INFOPLIST_FILE = SwaggerClient/Info.plist;
@@ -489,7 +494,7 @@
 		};
 		6D4EFBB01C692C6300B96B06 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */;
+			baseConfigurationReference = FB503FF47F354A87D697DD0A /* Pods-SwaggerClient.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				INFOPLIST_FILE = SwaggerClient/Info.plist;
@@ -502,7 +507,7 @@
 		};
 		6D4EFBB21C692C6300B96B06 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */;
+			baseConfigurationReference = 74246FD63841F7C179AD697F /* Pods-SwaggerClientTests.debug.xcconfig */;
 			buildSettings = {
 				BUNDLE_LOADER = "$(TEST_HOST)";
 				INFOPLIST_FILE = SwaggerClientTests/Info.plist;
@@ -516,7 +521,7 @@
 		};
 		6D4EFBB31C692C6300B96B06 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */;
+			baseConfigurationReference = 8ABA6AE59F792DAA1F79C48F /* Pods-SwaggerClientTests.release.xcconfig */;
 			buildSettings = {
 				BUNDLE_LOADER = "$(TEST_HOST)";
 				INFOPLIST_FILE = SwaggerClientTests/Info.plist;
diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift
index b1896774c73..b89c28a3ca7 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift
@@ -7,6 +7,7 @@
 //
 
 import UIKit
+import PetstoreClient
 
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -15,6 +16,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // Override point for customization after application launch.
+        
+        // Customize requestBuilderFactory
+        PetstoreClientAPI.requestBuilderFactory = BearerRequestBuilderFactory()
+        
         return true
     }
 
diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift
new file mode 100644
index 00000000000..f71480b0bd5
--- /dev/null
+++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift
@@ -0,0 +1,79 @@
+//
+//  BearerDecodableRequestBuilder.swift
+//  SwaggerClient
+//
+//  Created by Bruno Coelho on 31/12/2020.
+//  Copyright © 2020 Swagger. All rights reserved.
+//
+
+import Foundation
+import Alamofire
+import PetstoreClient
+
+class BearerRequestBuilderFactory: RequestBuilderFactory {
+    func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type {
+        BearerRequestBuilder<T>.self
+    }
+    
+    func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type {
+        BearerDecodableRequestBuilder<T>.self
+    }
+}
+
+class BearerRequestBuilder<T>: AlamofireRequestBuilder<T> {
+    override func createSessionManager() -> SessionManager {
+        let sessionManager = super.createSessionManager()
+        
+        let bearerTokenHandler = BearerTokenHandler()
+        sessionManager.adapter = bearerTokenHandler
+        sessionManager.retrier = bearerTokenHandler
+        
+        return sessionManager
+    }
+}
+
+class BearerDecodableRequestBuilder<T: Decodable>: AlamofireDecodableRequestBuilder<T> {
+    override func createSessionManager() -> SessionManager {
+        let sessionManager = super.createSessionManager()
+        
+        let bearerTokenHandler = BearerTokenHandler()
+        sessionManager.adapter = bearerTokenHandler
+        sessionManager.retrier = bearerTokenHandler
+        
+        return sessionManager
+    }
+}
+
+class BearerTokenHandler: RequestAdapter, RequestRetrier {
+    private static var bearerToken: String? = nil
+    
+    func adapt(_ urlRequest: URLRequest) throws -> URLRequest {
+        if let bearerToken = Self.bearerToken {
+            var urlRequest = urlRequest
+            urlRequest.setValue("Bearer \(bearerToken)", forHTTPHeaderField: "Authorization")
+            return urlRequest
+        }
+        
+        return urlRequest
+    }
+    
+    func should(_: SessionManager, retry request: Request, with _: Error, completion: @escaping RequestRetryCompletion) {
+        if let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401 {
+            Self.startRefreshingToken { isTokenRefreshed in
+                completion(isTokenRefreshed, 0.0)
+            }
+        } else {
+            completion(false, 0.0)
+        }
+    }
+    
+    private static func startRefreshingToken(completionHandler: @escaping (Bool) -> Void) {
+        // Get a bearer token
+        let dummyBearerToken = "..."
+        
+        bearerToken = dummyBearerToken
+        PetstoreClientAPI.customHeaders["Authorization"] = "Bearer \(dummyBearerToken)"
+        
+        completionHandler(true)
+    }
+}
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
index f3d009d59af..9c371f929db 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
+++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj
@@ -17,6 +17,7 @@
 		6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; };
 		6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; };
 		6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; };
+		A5465867259E09C600C3929B /* BearerDecodableRequestBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5465866259E09C600C3929B /* BearerDecodableRequestBuilder.swift */; };
 		A5EA12642419439700E30FC3 /* FileUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EA12622419439700E30FC3 /* FileUtils.swift */; };
 		A5EA12652419439700E30FC3 /* UIImage+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EA12632419439700E30FC3 /* UIImage+Extras.swift */; };
 		FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; };
@@ -49,6 +50,7 @@
 		6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = "<group>"; };
 		7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		A5465866259E09C600C3929B /* BearerDecodableRequestBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BearerDecodableRequestBuilder.swift; sourceTree = "<group>"; };
 		A5EA12622419439700E30FC3 /* FileUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileUtils.swift; sourceTree = "<group>"; };
 		A5EA12632419439700E30FC3 /* UIImage+Extras.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Extras.swift"; sourceTree = "<group>"; };
 		ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
@@ -123,6 +125,7 @@
 			children = (
 				6D4EFB941C692C6300B96B06 /* AppDelegate.swift */,
 				6D4EFB961C692C6300B96B06 /* ViewController.swift */,
+				A5465866259E09C600C3929B /* BearerDecodableRequestBuilder.swift */,
 				6D4EFB981C692C6300B96B06 /* Main.storyboard */,
 				6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */,
 				6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */,
@@ -317,6 +320,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */,
+				A5465867259E09C600C3929B /* BearerDecodableRequestBuilder.swift in Sources */,
 				6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift
index b1896774c73..b89c28a3ca7 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift
@@ -7,6 +7,7 @@
 //
 
 import UIKit
+import PetstoreClient
 
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -15,6 +16,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // Override point for customization after application launch.
+        
+        // Customize requestBuilderFactory
+        PetstoreClientAPI.requestBuilderFactory = BearerRequestBuilderFactory()
+        
         return true
     }
 
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift
new file mode 100644
index 00000000000..a28a4c90c0e
--- /dev/null
+++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/BearerDecodableRequestBuilder.swift
@@ -0,0 +1,144 @@
+//
+//  BearerDecodableRequestBuilder.swift
+//  SwaggerClient
+//
+//  Created by Bruno Coelho on 31/12/2020.
+//  Copyright © 2020 Swagger. All rights reserved.
+//
+
+import Foundation
+import PetstoreClient
+
+class BearerRequestBuilderFactory: RequestBuilderFactory {
+    func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type {
+        BearerRequestBuilder<T>.self
+    }
+
+    func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type {
+        BearerDecodableRequestBuilder<T>.self
+    }
+}
+
+class BearerRequestBuilder<T>: URLSessionRequestBuilder<T> {
+    override func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (Result<Response<T>, Error>) -> Void) {
+        
+        // Before making the request, we can validate if we have a bearer token to be able to make a request
+        BearerTokenHandler.refreshTokenIfDoesntExist {
+            
+            // Here we make the request
+            super.execute(apiResponseQueue) { result in
+                
+                switch result {
+                case .success:
+                    // If we got a successful response, we send the response to the completion block
+                    completion(result)
+                    
+                case let .failure(error):
+                    
+                    // If we got a failure response, we will analyse the error to see what we should do with it
+                    if case let ErrorResponse.error(_, data, response, error) = error {
+                        
+                        // If the error is an ErrorResponse.error() we will analyse it to see if it's a 401, and if it's a 401, we will refresh the token and retry the request
+                        BearerTokenHandler.refreshTokenIfUnauthorizedRequestResponse(
+                            data: data,
+                            response: response,
+                            error: error
+                        ) { wasTokenRefreshed in
+                            
+                            if wasTokenRefreshed {
+                                // If the token was refreshed, it's because it was a 401 error, so we refreshed the token, and we are going to retry the request by calling self.execute()
+                                self.execute(apiResponseQueue, completion)
+                            } else {
+                                // If the token was not refreshed, it's because it was not a 401 error, so we send the response to the completion block
+                                completion(result)
+                            }
+                        }
+                    } else {
+                        // If it's an unknown error, we send the response to the completion block
+                        completion(result)
+                    }
+                    
+                }
+            }
+        }
+    }
+}
+
+class BearerDecodableRequestBuilder<T: Decodable>: URLSessionDecodableRequestBuilder<T> {
+    override func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (Result<Response<T>, Error>) -> Void) {
+        
+        // Before making the request, we can validate if we have a bearer token to be able to make a request
+        BearerTokenHandler.refreshTokenIfDoesntExist {
+            
+            // Here we make the request
+            super.execute(apiResponseQueue) { result in
+                
+                switch result {
+                case .success:
+                    // If we got a successful response, we send the response to the completion block
+                    completion(result)
+                    
+                case let .failure(error):
+                    
+                    // If we got a failure response, we will analyse the error to see what we should do with it
+                    if case let ErrorResponse.error(_, data, response, error) = error {
+                        
+                        // If the error is an ErrorResponse.error() we will analyse it to see if it's a 401, and if it's a 401, we will refresh the token and retry the request
+                        BearerTokenHandler.refreshTokenIfUnauthorizedRequestResponse(
+                            data: data,
+                            response: response,
+                            error: error
+                        ) { wasTokenRefreshed in
+                            
+                            if wasTokenRefreshed {
+                                // If the token was refreshed, it's because it was a 401 error, so we refreshed the token, and we are going to retry the request by calling self.execute()
+                                self.execute(apiResponseQueue, completion)
+                            } else {
+                                // If the token was not refreshed, it's because it was not a 401 error, so we send the response to the completion block
+                                completion(result)
+                            }
+                        }
+                    } else {
+                        // If it's an unknown error, we send the response to the completion block
+                        completion(result)
+                    }
+                    
+                }
+            }
+        }
+    }
+}
+
+class BearerTokenHandler {
+    private static var bearerToken: String? = nil
+    
+    static func refreshTokenIfDoesntExist(completionHandler: @escaping () -> Void) {
+        if bearerToken != nil {
+            completionHandler()
+        } else {
+            startRefreshingToken {
+                completionHandler()
+            }
+        }
+    }
+    
+    static func refreshTokenIfUnauthorizedRequestResponse(data: Data?, response: URLResponse?, error: Error?, completionHandler: @escaping (Bool) -> Void) {
+        if let response = response as? HTTPURLResponse, response.statusCode == 401 {
+            startRefreshingToken {
+                completionHandler(true)
+            }
+        } else {
+            completionHandler(false)
+        }
+    }
+    
+    private static func startRefreshingToken(completionHandler: @escaping () -> Void) {
+        // Get a bearer token
+        let dummyBearerToken = "..."
+        
+        bearerToken = dummyBearerToken
+        PetstoreClientAPI.customHeaders["Authorization"] = "Bearer \(dummyBearerToken)"
+
+        completionHandler()
+    }
+}
-- 
GitLab


From bc247664eb93b17658f8e00ad801759ff008f8ae Mon Sep 17 00:00:00 2001
From: Christophe Bornet <cbornet@hotmail.com>
Date: Mon, 4 Jan 2021 03:22:59 +0100
Subject: [PATCH 12/28] =?UTF-8?q?[Kotlin-Spring]=C2=A0Fix=20optional=20req?=
 =?UTF-8?q?uestBody=20with=20delegate=20(#8299)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/main/resources/kotlin-spring/apiDelegate.mustache       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiDelegate.mustache
index db054a92c30..d45f9f79f2e 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiDelegate.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiDelegate.mustache
@@ -32,7 +32,7 @@ interface {{classname}}Delegate {
     /**
      * @see {{classname}}#{{operationId}}
      */
-    fun {{operationId}}({{#allParams}}{{paramName}}: {{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{{dataType}}}{{/isBodyParam}}{{/isFile}}{{#isFile}}Resource?{{/isFile}}{{^-last}},
+    fun {{operationId}}({{#allParams}}{{paramName}}: {{^isFile}}{{>optionalDataType}}{{/isFile}}{{#isFile}}Resource?{{/isFile}}{{^-last}},
         {{/-last}}{{/allParams}}): {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {
         {{>methodBody}}
     }
-- 
GitLab


From a812bf18a8108de80dcedfb54420c4e65a041d1f Mon Sep 17 00:00:00 2001
From: Hui Yu <ityuhui@gmail.com>
Date: Mon, 4 Jan 2021 10:30:48 +0800
Subject: [PATCH 13/28] [C][Client] Does not escape parameter name in URL path
 (#8243)

---
 .../src/main/resources/C-libcurl/api-body.mustache | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache
index ff19d883490..0c85a67a2b3 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache
@@ -116,13 +116,13 @@ end:
     {{#pathParams}}
 
     // Path Params
-    long sizeOfPathParams_{{{paramName}}} = {{#pathParams}}{{#isLong}}sizeof({{paramName}})+3{{/isLong}}{{#isString}}strlen({{paramName}})+3{{/isString}}{{^-last}} + {{/-last}}{{/pathParams}} + strlen("{ {{paramName}} }");
+    long sizeOfPathParams_{{{paramName}}} = {{#pathParams}}{{#isLong}}sizeof({{paramName}})+3{{/isLong}}{{#isString}}strlen({{paramName}})+3{{/isString}}{{^-last}} + {{/-last}}{{/pathParams}} + strlen("{ {{baseName}} }");
     {{#isNumeric}}
     if({{paramName}} == 0){
         goto end;
     }
     char* localVarToReplace_{{paramName}} = malloc(sizeOfPathParams_{{paramName}});
-    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{paramName}}");
+    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{baseName}}");
 
     char localVarBuff_{{paramName}}[256];
     intToStr(localVarBuff_{{paramName}}, {{paramName}});
@@ -135,7 +135,7 @@ end:
         goto end;
     }
     char* localVarToReplace_{{paramName}} = malloc(sizeOfPathParams_{{paramName}});
-    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{paramName}}");
+    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{baseName}}");
 
     char localVarBuff_{{paramName}}[256];
     intToStr(localVarBuff_{{paramName}}, {{paramName}});
@@ -148,7 +148,7 @@ end:
         goto end;
     }
     char* localVarToReplace_{{paramName}} = malloc(sizeOfPathParams_{{paramName}});
-    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{paramName}}");
+    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{baseName}}");
 
     char localVarBuff_{{paramName}}[256];
     intToStr(localVarBuff_{{paramName}}, {{paramName}});
@@ -161,7 +161,7 @@ end:
         goto end;
     }
     char* localVarToReplace_{{paramName}} = malloc(sizeOfPathParams_{{paramName}});
-    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{paramName}}");
+    snprintf(localVarToReplace_{{paramName}}, sizeOfPathParams_{{paramName}}, "{%s}", "{{baseName}}");
 
     char localVarBuff_{{paramName}}[256];
     intToStr(localVarBuff_{{paramName}}, {{paramName}});
@@ -174,7 +174,7 @@ end:
         goto end;
     }
     char* localVarToReplace_{{paramName}} = malloc(sizeOfPathParams_{{paramName}});
-    sprintf(localVarToReplace_{{paramName}}, "{%s}", "{{paramName}}");
+    sprintf(localVarToReplace_{{paramName}}, "{%s}", "{{baseName}}");
 
     localVarPath = strReplace(localVarPath, localVarToReplace_{{paramName}}, {{paramName}});
     {{/isString}}
@@ -183,7 +183,7 @@ end:
         goto end;
     }
     char* localVarToReplace_{{paramName}} = malloc(sizeOfPathParams_{{paramName}});
-    sprintf(localVarToReplace_{{paramName}}, "{%s}", "{{paramName}}");
+    sprintf(localVarToReplace_{{paramName}}, "{%s}", "{{baseName}}");
 
     localVarPath = strReplace(localVarPath, localVarToReplace_{{paramName}}, {{paramName}});
     {{/isUuid}}
-- 
GitLab


From ee2f0e04a95e8b0eb6cec07b77515369bd062585 Mon Sep 17 00:00:00 2001
From: Sakari Bergen <s@beatwaves.net>
Date: Mon, 4 Jan 2021 04:35:24 +0200
Subject: [PATCH 14/28] Fix csharp-netcore enum var name underscore handling
 (#8213)

---
 .../languages/CSharpNetCoreClientCodegen.java |  3 +-
 .../CSharpNetCoreClientCodegenTest.java       | 40 +++++++++++++++++++
 2 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientCodegenTest.java

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 9d569156159..12e3e15bb85 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
@@ -787,8 +787,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
         }
 
         // string
-        String var = value.replaceAll("_", " ");
-        //var = WordUtils.capitalizeFully(var);
+        String var = value.replaceAll(" ", "_");
         var = camelize(var);
         var = var.replaceAll("\\W+", "");
 
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientCodegenTest.java
new file mode 100644
index 00000000000..0d28f8f255a
--- /dev/null
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientCodegenTest.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2020 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.csharp;
+
+import org.openapitools.codegen.languages.CSharpNetCoreClientCodegen;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class CSharpNetCoreClientCodegenTest {
+
+    @Test
+    public void testToEnumVarName() throws Exception {
+        final CSharpNetCoreClientCodegen codegen = new CSharpNetCoreClientCodegen();
+        codegen.processOpts();
+
+        Assert.assertEquals(codegen.toEnumVarName("FooBar", "string"), "FooBar");
+        Assert.assertEquals(codegen.toEnumVarName("fooBar", "string"), "FooBar");
+        Assert.assertEquals(codegen.toEnumVarName("foo-bar", "string"), "FooBar");
+        Assert.assertEquals(codegen.toEnumVarName("foo_bar", "string"), "FooBar");
+        Assert.assertEquals(codegen.toEnumVarName("foo bar", "string"), "FooBar");
+
+        // The below cases do not work currently, camelize doesn't support uppercase
+        // Assert.assertEquals(codegen.toEnumVarName("FOO-BAR", "string"), "FooBar");
+        // Assert.assertEquals(codegen.toEnumVarName("FOO_BAR", "string"), "FooBar");
+    }
+}
-- 
GitLab


From 00d56375b038b01f2eac06534ab53bf8dc6d34cf Mon Sep 17 00:00:00 2001
From: Nicholas Muesch <nicholas.muesch@datadoghq.com>
Date: Sun, 3 Jan 2021 21:54:01 -0500
Subject: [PATCH 15/28] Use Map interface for configureApiKeys (#7982)

---
 .../main/resources/Java/libraries/jersey2/ApiClient.mustache    | 2 +-
 .../src/main/java/org/openapitools/client/ApiClient.java        | 2 +-
 .../src/main/java/org/openapitools/client/ApiClient.java        | 2 +-
 .../src/main/java/org/openapitools/client/ApiClient.java        | 2 +-
 .../src/main/java/org/openapitools/client/ApiClient.java        | 2 +-
 5 files changed, 5 insertions(+), 5 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 713332e20b7..e8833c12611 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
@@ -396,7 +396,7 @@ public class ApiClient{{#java8}} extends JavaTimeFormatter{{/java8}} {
    *
    * @param secrets Hash map from authentication name to its secret.
    */
-  public ApiClient configureApiKeys(HashMap<String, String> secrets) {
+  public ApiClient configureApiKeys(Map<String, String> secrets) {
     for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) {
       Authentication auth = authEntry.getValue();
       if (auth instanceof ApiKeyAuth) {
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 d8325401312..7399a873be4 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
@@ -313,7 +313,7 @@ public class ApiClient extends JavaTimeFormatter {
    *
    * @param secrets Hash map from authentication name to its secret.
    */
-  public ApiClient configureApiKeys(HashMap<String, String> secrets) {
+  public ApiClient configureApiKeys(Map<String, String> secrets) {
     for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) {
       Authentication auth = authEntry.getValue();
       if (auth instanceof ApiKeyAuth) {
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
index 3c90595a871..86ab78418c2 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
@@ -324,7 +324,7 @@ public class ApiClient {
    *
    * @param secrets Hash map from authentication name to its secret.
    */
-  public ApiClient configureApiKeys(HashMap<String, String> secrets) {
+  public ApiClient configureApiKeys(Map<String, String> secrets) {
     for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) {
       Authentication auth = authEntry.getValue();
       if (auth instanceof ApiKeyAuth) {
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
index 012b865ec4d..838e1910886 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
@@ -270,7 +270,7 @@ public class ApiClient extends JavaTimeFormatter {
    *
    * @param secrets Hash map from authentication name to its secret.
    */
-  public ApiClient configureApiKeys(HashMap<String, String> secrets) {
+  public ApiClient configureApiKeys(Map<String, String> secrets) {
     for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) {
       Authentication auth = authEntry.getValue();
       if (auth instanceof ApiKeyAuth) {
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
index d6a95552497..18bbee1df34 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
@@ -397,7 +397,7 @@ public class ApiClient extends JavaTimeFormatter {
    *
    * @param secrets Hash map from authentication name to its secret.
    */
-  public ApiClient configureApiKeys(HashMap<String, String> secrets) {
+  public ApiClient configureApiKeys(Map<String, String> secrets) {
     for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) {
       Authentication auth = authEntry.getValue();
       if (auth instanceof ApiKeyAuth) {
-- 
GitLab


From 0c5cec8f75a1108d1f8b242755828e91cafdc106 Mon Sep 17 00:00:00 2001
From: Arnaud Jeansen <arnaud.jeansen@gmail.com>
Date: Mon, 4 Jan 2021 04:02:39 +0100
Subject: [PATCH 16/28] =?UTF-8?q?7141:=20filter=20out=20problem+json=20mim?=
 =?UTF-8?q?e=20type=20from=20JSON=20mime=20types=20fast=20tra=E2=80=A6=20(?=
 =?UTF-8?q?#7976)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* 7141: filter out problem+json mime type from JSON mime types fast tracked into the Accept header (resttemplate)

* 7141: ran ensure-up-to-date

* 7141: minimize changes with master (keep using isJsonMime for MediaType)
---
 .../Java/libraries/resttemplate/ApiClient.mustache    | 11 ++++++++++-
 .../main/java/org/openapitools/client/ApiClient.java  | 11 ++++++++++-
 .../main/java/org/openapitools/client/ApiClient.java  | 11 ++++++++++-
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache
index a6687d778cd..315fcdd4415 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache
@@ -522,6 +522,15 @@ public class ApiClient{{#java8}} extends JavaTimeFormatter{{/java8}} {
         return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$"));
     }
 
+    /**
+    * Check if the given {@code String} is a Problem JSON MIME (RFC-7807).
+    * @param mediaType the input MediaType
+    * @return boolean true if the MediaType represents Problem JSON, false otherwise
+    */
+    public boolean isProblemJsonMime(String mediaType) {
+        return "application/problem+json".equalsIgnoreCase(mediaType);
+    }
+
     /**
      * Select the Accept header's value from the given accepts array:
      *     if JSON exists in the given array, use it;
@@ -536,7 +545,7 @@ public class ApiClient{{#java8}} extends JavaTimeFormatter{{/java8}} {
         }
         for (String accept : accepts) {
             MediaType mediaType = MediaType.parseMediaType(accept);
-            if (isJsonMime(mediaType)) {
+            if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) {
                 return Collections.singletonList(mediaType);
             }
         }
diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java
index 0a2f38a339c..3081ccf0871 100644
--- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java
@@ -476,6 +476,15 @@ public class ApiClient {
         return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$"));
     }
 
+    /**
+    * Check if the given {@code String} is a Problem JSON MIME (RFC-7807).
+    * @param mediaType the input MediaType
+    * @return boolean true if the MediaType represents Problem JSON, false otherwise
+    */
+    public boolean isProblemJsonMime(String mediaType) {
+        return "application/problem+json".equalsIgnoreCase(mediaType);
+    }
+
     /**
      * Select the Accept header's value from the given accepts array:
      *     if JSON exists in the given array, use it;
@@ -490,7 +499,7 @@ public class ApiClient {
         }
         for (String accept : accepts) {
             MediaType mediaType = MediaType.parseMediaType(accept);
-            if (isJsonMime(mediaType)) {
+            if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) {
                 return Collections.singletonList(mediaType);
             }
         }
diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java
index acb991c6606..335a146e1d8 100644
--- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java
@@ -471,6 +471,15 @@ public class ApiClient {
         return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$"));
     }
 
+    /**
+    * Check if the given {@code String} is a Problem JSON MIME (RFC-7807).
+    * @param mediaType the input MediaType
+    * @return boolean true if the MediaType represents Problem JSON, false otherwise
+    */
+    public boolean isProblemJsonMime(String mediaType) {
+        return "application/problem+json".equalsIgnoreCase(mediaType);
+    }
+
     /**
      * Select the Accept header's value from the given accepts array:
      *     if JSON exists in the given array, use it;
@@ -485,7 +494,7 @@ public class ApiClient {
         }
         for (String accept : accepts) {
             MediaType mediaType = MediaType.parseMediaType(accept);
-            if (isJsonMime(mediaType)) {
+            if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) {
                 return Collections.singletonList(mediaType);
             }
         }
-- 
GitLab


From 08fc5bb38ffbf797c0976e0b64dcb7bcac18ee46 Mon Sep 17 00:00:00 2001
From: Peter Leibiger <kuhnroyal@gmail.com>
Date: Mon, 4 Jan 2021 04:56:38 +0100
Subject: [PATCH 17/28] Update maven wrapper (#8305)

* ran `mvn -N io.takari:maven:0.7.7:wrapper`
* this fixes colored output not working in zsh/MacOs/BigSur, not exactly sure what caused it not to work anymore
---
 .mvn/wrapper/MavenWrapperDownloader.java | 117 +++++++++++++++++++++++
 .mvn/wrapper/maven-wrapper.jar           | Bin 48336 -> 50710 bytes
 .mvn/wrapper/maven-wrapper.properties    |   3 +-
 mvnw                                     |  89 ++++++++++++++++-
 mvnw.cmd                                 |  47 ++++++++-
 5 files changed, 247 insertions(+), 9 deletions(-)
 create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java

diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 00000000000..b901097f2db
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    private static final String WRAPPER_VERSION = "0.5.6";
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+        + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if(mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if(mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if(!outputFile.getParentFile().exists()) {
+            if(!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+            String username = System.getenv("MVNW_USERNAME");
+            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+            Authenticator.setDefault(new Authenticator() {
+                @Override
+                protected PasswordAuthentication getPasswordAuthentication() {
+                    return new PasswordAuthentication(username, password);
+                }
+            });
+        }
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
index f775b1c04cf89b25c7814d3a8a7c810301092e57..2cc7d4a55c0cd0092912bf49ae38b3a9e3fd0054 100755
GIT binary patch
delta 13080
zcmY+qV|bq3^8X#1josL`lQy<(+t$_CykgtAVyj^r+i7guO`i7t-T%FxeZE@jGvApt
z$2#WCoNK0^AyQ)?6YK$^2>mQ*;*Wvrq&QOLSmGUxAUe39p_&l0sIO}ja;8ITYZ_|h
z^qvDB1HNy;9$KO}`*`JFFWKsq;4Q@o@U8m9iNcjqaS48kRrxyIDDXk$=ar$7D$_R~
z*vTG52~M~2Bwaf540Y}>^crKBzvFI$$m+6lAaJXv-%30dfef5>RMS=Ew(>t$;zT6t
zFuJqZlzEB_ROlaDh?gAHT%^;E*ZB<xRxp%gVc}#8ezBH=fq~J31C`|o8wJ40!66se
zcY!7lEC_N<BG7z)Y`kFq*xDenVZhmdiI{}IXGC-W1uK)Oow2KHimJULhA3J<>LPJ=
z_`FT@6O7DIi%~p&ukm#0&|oq27c7$}qf`&;DLv1uZpIKm2?=IVr0{nV^XzW5U=cDs
z7uQDDDS;_7i-*HnM`19vtNA|MfuvdeJXEhv>Ng=_v{~VKKNhsr+Gu|vBzb+JQKjp+
z>E|dwFvZskNa3v>%;8!Tc||FVrgr5_Qga{CWJ9XS;UQ^FnoIA`kd32TI7~pTbqlFQ
zHA%T|+m+$;QteVkv%$f(NRdI%a-0yfi{ZZo3pTI1l~~O1D<=l*L6E-0(7+bAup7#|
zTP!;NQu=YK_`<Ix{L~%jG$SmAG+gg3Cw|j_s9?f@Gl0@=+Yrmjy1}ORM@w@{vw=OR
zy)CvA<$|SncQ0WKw8<A0bL86={yLAQo1vlB!E2&L!=bPhgJR}c;>E=g*DfrRwV+{Z
zX<Bu$LwbX9@Sz^HO-yVYm>g4i-v+Xokfzn9xmeUQQ?7HRVUx=v@78T>bk?;gU)uqw
z8&N0l&uulx7r}!@Jj%&rY!T*EiD1pcW`_><j8{MdZn`7C^ZDm@?y|d<R1owLD;~-E
z2^m#`E?{NL&LtALC2E76qZAV!V<x$FQn7`BykU>D!*Yr8=rCI1nbkP2Od#^Fn-mUP
z2NB!QIcL3Ro@SforM)Ip?6L=l#DomH*FRLvm=zPuCC%WIP3Fl`O-`t<j`?(1v3HN2
zk^j~f=h@f7PY_^W`;frzh=f2jcyj<5omQ{T>pl}*l|hD)99(Q9{OT}W<naQggjVBt
z!b-u<c(w}emYG44t$4OcFuG=nb8+q!UUt{XuEPx8#@E}WRuVAc-N<05?G&||Z|>Sf
z6Tv9_TVzM{i{~y_cGsxYILC}DIEiNRphZvE`hy%I%2?fS0j_SvU>U{M_Gy4|uyqAt
zG2C<f**EB*)2)zrmRAPMf&c|6pMac%%26uM#6dk6_H;^y#V>t^k9@Cs-R7_8)O$7!
zeT96g1w`@GsvShbA?K^1g=z4zj37@f!p9ODg{LpHaJIRIubs8WqUNw^@MD%@CC;IB
z(~BLtCpr<HteQ-qg00VrKT!ahl5$N!=q@lz^<wF*R^%_>#&cEjgVtD48Y{wrDZ}!v
zAs;Hg!DV*2z`2eaQVdB2a>%?um`ob=7e?n4&(mprFkHy(sS8}HSS9JCir()A3*y+h
zHSLNtawA=u%}cwno_){{r%Z6JP@b9(YQep5=k}v{vvk^@zZ{gH>8S(AU9AK>t|F8K
zgi(#}?Z~Qeb1BY%V*LS-7H8?oM%5K)7EzK?0M?w43hXe4E%pQXEIepj-;rfZ>^dF;
zJ=VrW&8N7tSG@~dO;>K0);Q-w`U~RijctHSIEG7TqTV6`&JP!YVX9$<$FfF>u*+cM
zS2W7yPIGRw^xl|P0wuUVRWU|jhyV}lMAQIi!5R@P;JxQEK2Pqj#AWj+e~E;HzfP#h
zOhn5P*&PHAK8G6dsDzT5x>*rQa6fQs*hT5c4-K3B0&AYEq9dWZnuKiztXrL(mVeyv
zz3e`E%r(<)!9swa>Avm-1blpKOqIR+J}HCQ??B_zL1hwpa@Z)OkFe77IVk8HA0-29
z738!W+`>6cEL1m8Ea`Gw#*N1owlK=O$Fn(#XxRnve{s5Hq}*|+!DqYJF%9iPaCVw@
zPDZ;A?Y_3=2~T?#d^^JC3Frh)dReRzaHwimeOl!ofcW8#a<;yLwMKHev8E1hSB=FJ
z_@?49duK=e%Q8+EqA%B5e<#<rOp+haruBu(svR!?s&cYruEjI%`*2u^Wh#gR1>vcM
ze?S8)Mav-{n;wde03WuBv~KqMb$Mb@LLi0`#+FrVAO__`q%^glNxX%=ZR;sv`bO&g
zaCMXBw8W=eGou;`J#7j-sjuw5XH5%fL?jLC0j@M9<8Db7Hq&nQyvz(QU99{7a<pUb
zhwanp`ao9P+pfq(_=*jYVHe2d2nl3lL<oYsNw3AWKq?M)%%W6D+n=*p*gVZKkOXN=
z)>i08{tq2BQ_&1R>ubhMK6vLjg34otZlO((r}{1|`?Ancw>Yv3w%r1K%;i^a3K6Z4
zvLodo0%P{E#8@t%9T`Zez7kmi(AT?z{e2%$2Rlvt*L*tNnx+`fH?ZR`|6E?dww=T^
zFYX++2<&8H0FUP97rnQ9qZ(A40|;B$WReJXoSW|+h5YBqB@vMNut|#{gXR(gD1jZ%
zJUE^Z%aOO7+0;hKx!lvSi0NL7;QYJhY7b{A#ey(CGm^|wY8gyKR27kcp0MH28_H`3
zNE}+G-89rS2MH>rbrIo~#DK}Tizdr<Yj(=~jDZ1AN<m#_Xc+pyfW~m+TqtIhHiI=Y
z(_)?DWKcgVWZISrc<&+7ppOjZxZ@+*4zo%Bl=I1WT#Ocovy1*z-b~OU&^*o-_mh@7
zU6mU*7{&lwTvLGdfXN{MwvMF8#WTj;BA_)nu&@J(7CDVsEk}qryb1VCv9Y66yCh}1
z3TK6-cZt-W-*^k5PHt%~F~?$9fe9oZYmVNSoS`Q7ojqZQ;uNP!lP!x)P!>DezG#o8
zuB$+9VcPjyK2VJ@is2j1ZVA4DN+uAI0?!LCRT;vS%|buXJmC;Pmm=`u0$KZ={utJz
zhF|}Vpvn<`S%!=6Edk&Ke%zLsrfLgTJJgI1G6oT{PxxfdC`S)%yYu|4v@4S&48+=x
zqVT`*=@K2d=jhSnLGD85MsrjJouhx!8R(h3aPU5n_lgeVo-*J3l7ifY#jVWrW86x3
zio@fyO&jcHy#@y00BnsF&TwH%O$N}j&y37|-0zc$YjkDco~Zwbsu2mD_>E;wBz2+9
z-An`S+olK1LG13>&zSv6XZ+LNkUCc0@`veY2!<DX>?p&=g_*epI}(nS7og(4Q^qF#
zJ1p{g{8zaGXqr<EXRTJaT65Az;}^+|NIY#=VvYo0dJPr8YzOIqr<*H!0H0XLOSEzT
zCT`1Edl&RGvtqok?vO;1DAw0qfX-<l*S@~zqUW|B5|0=uZ*#MkzgmT%i{(fEWbuC3
zgxj)$Wi>?}?6%p=z3~+MlzKM{YN#(I+Q0xq9Y`=ag`#Hr7wy=1xhh^3r*JmoXf!>K
zu)`KPLWL@zG;8siRl}qraCeni1HtNv=hn2oBuATH+<`B*xZS%O(hDLl8TuqYroRl?
zPeKSghE!(LO+u5e!az}R%M~WK|Ik~;LN*iJ!CM10BIrBH$WAm&4~1!=uR;KjlT2G>
z;m(e9>!$gE6VmVpciT@e2gQsVu5w)^n|ZS50K`qe%#}Ta!%S-6<&N)jX2F4AXsfLi
zZCY--<pL_gmX$f0N=?ovH252w@XVEIf8iM`r0~!b90%S+P$9v4yzNcp=@T@O$o-9i
zM+t2&+m-Db73!Kn^mcKPp;Fjd59PYdbLXN|ltSzQuhR4-!jfi%{wbn~`&*zv!+dcs
z8ZI*65$4MBO?|-dfT@Qq2KfycKuvabSM16w+n35_-B>F}#i&1ftw?n#@-dm(XqNfD
z_8oAw>37CoCK%0B!+bdFpTjqX(C>06avFH8cAAhw?C{Ijr<7aJxPF-xUfb8L@7-zz
z3f0?tjsH2ssf@Fa%j#ZW4Hq#*&;hF|iD?;trZ4b#k#yY3q0GKbyGGy}#%E;NZ~X(&
zvH=4F#T^gD)qZuPV;d31R~NES<!D?`dE)&%gFo|~btxl>G1zBXeZt*@K0eSK!kbvz
zRZ7R-E{0|I7A?JK;YQWd*i$0{2b_Fqa(&+;!(lX4jb5fairCD@0doww{!3~y9i17V
zgc{GNeip4tEaD5*K4pWgnKHi$3=MR6T@2iVm0~2uvzhJkyWG7+Ezby=t$BB1?9`in
zfAj>?d}h;$&^>&I{it)edwuR8og(gmad;bV^VR3wpc4`I8KrWL8sP42v^>YqNRv!J
zM+8e1FReq%0k=FiZz<w~fGw9<Apsj;I}AAk<=)VAM2YW^<7+n4WPYy%q38M?_P%-s
zgp-}8GDhmD$s=I`RPbn1P{B}*`K|8lL<?}_@o+(*)XkZIk+hLVIlJkm_WgxYUZ%=S
z>e9WjrxPKAEq3Ym2Q~^ddkOvX6e@|v*WgKK&OBEvKZKfLXG&K{(UpEz!enHCKyO1<
z?GW2L3~!^f>d572Dc(FMr*One>Ca%Tp%t5V-wo0sit){b@*T%yh&)AXdoy=@yzDri
zY*BX+{2`cArzjt7keW#-zH}efn=hFL=HP|e3FKJtsipIY@;sp^1*yd}Uv!Ii24~cv
zMW!qE$uwvW_t_Pi7wZPVis=PF!S({7I%o(eA~+~-`cUpl(-x777PX`%)?-yUq3~YN
zB-ZzQ4qifRN$dccl31>#a6}&_4<!<IID}oI_2L}V*($2Kn!(h2gWo48p5Nk@+*<#H
zzVk<2@`>MW0?$nJTqW*O;;jKxI9;pW2;|a-i|1KAavvsG)$#@XjwA=LU?k^e_emL+
z)4_KBTAC-knfPAtE5n0v4^bhsiLmr*4<X3zk$Fw)wQd8X>4>r(Eah(`e!p;VAmVSt
zYrtvn`(RC(pvwlkR@v3oHJ`Fr6I4FA-H{+%eCT9qqUt_GqzE`5uD0h6awIqY3BdIE
znK!`5C|S_FclD5Pz03;mK%u?s2?HFyxlw+FKRaL;&Iu^=0<%4eb-xoM_eU2GVp)!M
zt&hKI4-tGUx!Vg+>51q)V`dG(1T^XaI3=8rC03wfwk1s7sPy7=+h0+NovD{Dw_p7A
zga_|o+uzX$vEonF!w8v%cb!;?!=ta$htBs@r8AA!13lU3JlO!JH$~x6StQRRj|yGU
zo4Zb6m&5vUc{J|bS)VvgdQ<q;Wd-i0TOO};W7BTc0_Nq*dvPwwmk?HpQ^h`npu4lw
zHrQD+GcB(Ids3+*d$z(Of?!?J+o64~614@e;REjAa;2c+C$})<8QGuIQ1T|W5o3M}
za3~hi<$t3yqZtPjRRW<lFmK)PvzFCl(m3|TvGg0-kCG;y*yL-rj=B8A_mxBaa1R@m
z#YS{BVuIy){W!xNA0&b{r?$iU@-&5l9QUurdZeyeUEY034kJgmNOtw?9-HAVG!L%I
zJODp&Zd@DLlvfDfBvC%d`tpc>oc;DC>nrnaP>7f<@@E7T5;||9D`%8ryr<$72ueV^
zlbw-SD98M|OL;pWni0Dd9XztL*WCWB<4n|oCWwQM&iYVk+7>v^%_iZfq7a#wREm}3
zqQv{{k-~rxVu!~?Ka{Z_?Z+H#4UhP|(;oQ`^&KeXv7^`mgBtauBGS~zd>3Nh&M&l`
zsjkNlT&ZjT<)yJNR3|TFlJ%*_jS^v;Z1g91%c~FBTECLw&wfwvUU$9Xq~v7b1?y@}
zIhYT1A)|ls6e_hBzh4v68fuDiOaQ9aaMg)c(+_gUs_iYjuzSl4{KzCWn$x3JFxEe>
z!60}#uEHRAwtifQlz6^hinMsHsl;HssalA%ssTX&1_$o1Luz?*ufpH1#nj8`a;LxO
z2oy-}M6On1zt<@ZS&FZ9ah@ix^V5F(nm=dSfbnePS^xU`l5%Hb!1t(|G7yhm>p)T^
zy8^;=%cNdfTO%C2UR%2brhA7W&ae3VlP=E<a7klkQW=XkmzGbhK_jBEgxI8tM^e8C
z>qz7sTM_C@cJ%iTu)n?PSI&@lCnPX13*5iGYGWh@Cpf^{h;ZNiL(sZJyJk2o#x8n*
z0p>Zu-H5;}A@-USPmDraD|K+yh<!0`Z>W=hj5yT{^v(Vg+%}waUzijBBskPuT?4w2
z4urMpD#x+-Du=yw<_2T;Wm_+|ua#yJ#sG<qKl|qE#_xbj|Jz@A-S61nuw2GPB8?I;
zNNgHR7QX|CJ84bM8;j%zoawO}cjeD##AXq~&)dM`jUE^mg{o-n#KSXN&U%K3r4Vd%
z*0>yx&X-%Nn!7F679V1}*H&BI&QCV#&UHl9e?a*wvJpq2)S!<q@6k+IHB2Ft*)h{S
z(NQzv%1~fHI8Nimg%Q!yl%Mky+0<y0@q_eCHCzBwVPgGpXQd56C6+=<`cflB`?g<a
zlw5N1Uk?fC&^%hQ)9&E~va<8fztUF9jSuRH9?zQlW1*>KT@|Qk-pZ$^lcq1AN3H5t
z{B+>&nIMC7&to?VeXaJA%4=j691$e#I7(u-O+>}BzeOIjr?+mMtqrOI#QFcu_=uS>
zvZ4WCwI-2LcUWjs1(23myVBUvceW&g^OyR<Lk9G%M?M{Rc4<+t@V|Dvc-q^aZp?Nz
z4}{CsEsNMIzu(1BC3y@Eequ0(3p*<&`bDkP<z_R=ko7Ve&Nok>WiUSTi+$#sL?F6M
zleo!<^3v`avYt$i-fVe}-N~<22O~;-;pZ#Buo}%c8vW~-oL-y-+iID0hq+UdL&ja6
zK`U0<mm+`4B7q!Ue}n0i+2Rn*46X30W3c;x<mU}14V0fJ?ZeT?LGG$Snch}E1*&cA
z9Q4%hD*OBw>i9A3*GZx(@U!Ha3S&dl+}I$X4jFP5Td4H5p=Eu&>B+egnu6c^rC#v>
zgG%d>5@%Mkz06r{0VJTW;em?qOai9w?mS<=daR3;bxdGHq3{XW_1(jC90TK1nyFd}
z!}kZ1XPe@~J<9GlRVgi%xuB1_4f^`^%;$svWiF3%tQvmv!nmGf0rv{MFvnri^}MDK
zdnQFMj@<QM8=XC9>PZFcVyRsE-EOG>82s+877mTvG6at=PV628b?Hu)upBm5-;6GQ
z)Lu010wNK=hV~TObA=(*(SV+c1?0{|BO>})>`{j>4H3wazY>x>kePhWrr$X8#ZY$F
zYZom1{Uy?b%0b<O{U>NGiv4%8g6Aiyq|8+q&yH$10u<xYYF3LOV25B~icE4Fz{|RR
z@AyRH*pc12lb+uyTpQeAUHTV-YWb(UVL_M+s<B2Zs#R!|I;K=?ON)9YypeFZ_2{WO
z32UPB<pa0_ITfE359D!wstZj+HTlYKi)exJSKlJ1c13UCUE?p8<=%kLX2jlf>+_<O
zoGD&f*AM7aw%2hE0yaC*PoMC@07+b`W5$m;txXByz7K*c0$~F%#AObup7Ml!7}dYa
z1(ULogjY;%cgD_mYfik~-B~aXb;C<4-@R7{+3~Fy-;g^o6nIjaIAIqK4&?-Dd#Zkl
z#cEX1Ny_^Ton!e{i{X^`T&q)=IVR`hs=gce<-9xr;|#sKtad27#@D530excQQS26E
z7BB|r+5E->i)tKrQOnT&H|l*Lq#Y>4{yjsLEUg_>K97D9_oR1l>ddAu%Dq@b69j|}
z7_sjyiCQq<DmIO1@bA{h7e&|vP7GPM(<RQ$HrcN6XXREzsfp{4*67QQS@|a$TKzFJ
zt;Q8Iy@+=0KyEE9?GM(4fD#4Yxj|hXO09%CpgsA62weqH!CIW;m&lMf^f?OWJcK7K
zjNT~Eqjxc@-gB;N59ST5buX%L^WVw&{Dgo#pm+2Ws}fvdP-%Q*g<S8K1)tpzP{vR*
zV|mP3G>T)hse;8C-3d}QQVWJkbx@oLNhtL|S^hq7fcv=<>GnH6z;!e~E$h2I-JYz3
ziMI-QdLVKb)ltxovk{{{D`<Cs!Sxd#{#b0?yEOG8wydEf3YK6&L3xVYkaWN?vq%~3
z59Bvz2M+g0uEE{Ka+Q}Way43ww~9#NfpE+s-14$@0lgMeo5$zK$X=zGawJL}SMS2-
z=QOH!1c1D1jgiwVAUlnoBy5KL$b+<RGvmqEToqmBj{P-zI|S!L%F<=t%7hE|iF)xT
zRP;p~yAk!L73KbD0O=XhStO4r^Ls3treQ$)$pZ=1yDGXPSF{rl%e|2Fg&)$JWV^Sy
z{&)PB>$qdz70D-I4B-Lmh68`ni&ST0EK7H-U5rGPuU@j*0Cw{^%y{eyR=d!oteiH@
zQM_No{39o$3mw8-%4Y#&O3|BW%nPI5KBhKK({XEkH7yTczxs8l96YQR)vG1Zt!Yp+
z)^wzojwfV{YwPHXe7Ei~@}XJI2ghQ|+DPENyPma{K0;+R1AWRFn9uk;8lldS<}J?K
zyfQRfT&WgI2dJHAS#FM8r6JiDfB<DPYrWPxwWOcpt6LS&;&hnurXZc%D}~zMjF7bt
zCPcfwlr!qy*bgP^2o}1kQ<Iw^Ur&E3Ipnn64mo?E2^~~r{jwt_nZzghi;5ZxrK5)W
z8WCco-QYyt+DY=km|g)!J_zfV@tVx?nNdJ@B^`E|7l4T9J{;zEk;16(cvWwqQxpf2
zowasbv~3RD*e|!GtZX>ch9<en<H5#KI2n`974@=GYljmmzXtB99IAM44dzKizS1dy
z-)IR^FgeNC{Y~fviN?d<KAj0j*IzE})t|=*8SJLqGvHFslz%039B!CNmiK`L&ChUN
zOplGsAONg^wn!`4otqYQ3fuEs`#RQTjNO9Im-Nt`KJ2NA8MCB0d+Ba`*~Tq2VWvAT
zI#Po2(T}6pj7LaPw5_M|D|CWBMR73a=-qINzEvd(`wE3)oHn(08MDmXZN#!>3Fi2i
zCMKw7#>+g@Y-V$x;10Dom!yheIHJPN$Xem~c>s}|=DI*dkEoJ-PZ>?fQYcOZm|6%v
za5VKOi`f<{Iupw*j}j#5p9zBE*@$p*?c&sPGC6W<{VfI#$nb|O)k^VP2n6@=Yhmw4
z6JjQ%>n8@dWWLRYl@9RYEIuU_EM%dCi*l%DVOJ+E?|XN@l4K5~k?=<D6YVhQ*Y8K_
zv;acVBlZYxtyQu&E(pi#51(DiXgx>DcxRA!>SxG`?X!u+rv~MI`^MA4&LcPS*n09g
z^PfsCk%Y^&Yxc&bAcqi5%&U0zJV4pY=R8}&;eYKE<_3=Eo%}c>R4v^mnb7>Lrue!?
z>OGhc?!B9?;H%p6IX-E^DLaiIO0UDz)ECg{5zRbe8uq3_3MGk%BFGeO{jHE|>Snyb
zL(o|&lt_gz3L9K15Yf6TTI9C$k#f$emB52-r9N@cn32dZ9vFqXyrRtX@m#B{jV7{I
zq--LxydzR>I+^T@hT|+k3;m=S%$9sRvZV^&RX!V^tfzTQE%W~9;z(t2?a7q~Q4E-I
zZ9ExfDRX$X<tYQbbB^<05F2a}-(IyQ_R5!kFA?YnA_D^);7$&Cf9q6X-2tg7!7m-|
zLcAOP^duJ2FNcuDQDUtm6)x{Mf?~R`@j^W%nAP%t(u^yjWr@QI48zdk3|mlVw63nv
znabnfiZgaCyHM93$O#+o#IO>ExdhyBbg=2JwW;Sx7+OSMLQW9BZ!GI+JTi{&+Gxsp
z%X{PZVHY*6=$`WijpCEX>c(w_IiDdPttv}&L|D2@?GK{1s?Dnv*Y|E>xl1O}GzgdV
zl<rVm6h6}5J@o}BHfoytx0DouN==aRY_HXQ<MS&!&fqNOpA>dT`-}+}763S2$Sm;%
z1;YaHRJ&`-YbwVG-br6<=;plW93AxK_i=O2HAiuvBozQtCH$ps5@Dbd+c#x#L{z+&
z9Rgm#n^~Ng-K@aM-CS;Ee43g|-atd*f#r%0e8XeuY#L?p;j1u}-U&W0KH2wk={@NA
z+P32|-rLVi2bcSD0~X_bHh|yhQ5t%Yw$ni<)k92r&;+ME?;uG80%v}%Z6+0gZ(M{w
zEMgLGI@_>&<2~MRmz*ar_lh@$oLjR7PVQZVT1M&aq!5>Cj#31VfVeN_P~1NS;eMJf
zlN$EPyAbm43$C9XoCc5US?Dtvw)>!N8f$>Q3%ub6<an=&LXB0A?gRWsnaem^#I6Xu
z@}4_2!>+RQQb;Mew_C3SFE*L{pX~ke@ch&6wqV!qRX${|`TaCSV?SVePeDTc;ZK4(
zyF~|x*RXz?k*MV%($5*)Bn>_?cUdTakLj9jVVAL6bx>2nQv9xDAnRKj(AsazxO%Tw
z7``dFcR^2M^^7;{7GN`4B}m_?g$oG4O}R&=zMlJZM{+0CT-I^6GACS-7cucA%`hQz
zwR&E3-URM`Ie4tiAiVChim&xx>Co1<+ZI+=aJSqe`D&g)=h6RWd?j(^mGn{O&Q%n~
zU=Px#A_$WN&EWlkMc_yCY^vsONW@Cjj^S(N{5Sb|Xql?_b^!HO#miEz2;SJqrtk2T
zA!9DSBL2skiiT>c1!xyy;=WxawW6yG;qz9hGb_Zd3cAwhC~F2Ml{(}8t_l$@@R@O#
zRc#5^)m)Uy*|tm2nzuEtnHC31r)!h<w`ywKQ)irUF1<3-P6Jz`UiH!5)K7g42F=u|
z6p44@vgQRZ7{JsR+2hAp14VQeKWknutIw;(3sqpdRFVmahH<(&OMf*9<<rHF*tS^A
zR#$iG3nMIn!4F9%Zf~OR%7lYsJRzD+%n_7cM2|CvkL<z3PP<Kcxn+*G&MzWN?z<c~
zm!k+EwN_8FlB|&`v_y3mJo2?5(RRJejFHwtX^k<gb--r)kPGGMNIr^sLzrWi7ZTRW
zg0jY-PJ5K4p|j>`8{N#9Q%mIfkpvMB0Ho*tg{zCM#=0F8%yc3n>p6l*bK9l$vQr#)
zgVy<dz%L+VRro}Qoq2%Vb^>WU$=-pSe&#YjTY5gk2eK-yvtpx7fU!HL<TTFMI44W{
z9;e#O27peHC5UikUcyYwkb-!!>GN<GE>I8n5-HAs$T9PM*KNnRe;&QZ7ee-mBK6vv
zGS@YwgMpmsa%aKexq*Dn7<@&+ft~l`GJ)WDN1O!?`Lc83f)a*l^Cg{72PuW&#-)ds
zg^3?>?8n}LT;{pOFf@SzLfK8Lxg*s!c{r;fGN5uPoJL+IdJcf3iPaliRC{V8@IocT
zM4Q^@lpkRsC-K7!pmUM`t+UyZP$LnR`sG!IJG@6?p+}U`(Bz^^uGz59glxrTM-kD0
z{H8Rco0*kcVT(B1ji`~yRAz$}c8?uo>UOWq{b)hn_xxLkZ#Z1J-B3tUlYv4-_;X&F
zDnJ}|ZiK0DR}eH{d+2o)rYT$BQ_z%&FWlBe%4ldN3AnkFM0!blX%b*H7K54J$d@UD
z<91}vEK8TVbdq}JV(ROJMp!z)0;N#zkAeD|Z;}OS>f#ai@w`(JG{4hNv6d3&ax_+b
z@;2BXL3By}xDQT<&04Y8`vCv@LtwuEP8W6^6$~tb<e%5;6LNZhz2ck_uAnD@t>)<W
zZKYB+v_X5id&+CXL0ot$D(Dz?%I)a(swI`#=Gzvc>#`^IL8w@gH}H3wUDwVqobY;S
zU&kre+_~HAmfnDmC-^P&Tq_zD4)SAdzwf^wjqjh8LKYMEf&&v$iM(?Y@MVzL!~K5N
zd<)NQUgO7f=+EZ`=sFsld9>m#3kCOV!vq{rPvJ(@v<xV%#%v%G0h?saWIAbKT-R1s
zeA6EB(uc8-*>MIt^LE7U<mXw&lpe&$`bh_D#)KrLi%EP=&z*mY5G`?x>#L31P=QQy
zovvB;Mc+md$!WQ~8E{Y1tS>dcI}Hp%jUvspkVNG)ZDQO27%!pcRU66EU{TU~I;Q$=
zB)ED5$*|=aL^OdUPpkt;zw;uNB2U6e3IT1-beId3k)2k`9m+D>OOhPI4F(w0q@`Q_
z2>HRU_!q3>1}a?FVDxtzFbD`=l1_f);#-_WnjJ>Sn&AGTNdb8sSAkPYS}b7_$zm!c
z_K<~z$wYbpD37L(%*v;K;Ug$XHe1Y(UzX=?ooI6Ops9S9??{b=9pBanqsa-KGl<qu
z&pGn@dV87bvuF|rXST~#gT-J<=@_73r(Q)|bd5L6df}!pEu>mu(Q+tV6G;1Ia=y}R
zb#$IMw^DFo;f|Gvyzy6YBF>ccQ9Df0rYtMT-=aW*g$tpk-+coI1GE3Xkp^BWE`T3_
zCf-Nya=qDp!yaEGJ3i$^ow@F))hvf}xE=lAb@lnO`|P6LUSo|~hpIwZ3<^Sth_-nx
z8$yW^mo;KTxwWbWqWPur!v?uXAVla#C$O1;;P#cW!}qf1apL2#`|@^IQTU1F+qp?R
zA|ez%lB+;D)%?#8?3gNQPC>6xH2?<u1d_+dLPFz_N>K-53dC4k74?FV+`^Aw!5?w9
z=(0xUx=$iUPKV#6G_6?H1zp;N*STHl%IF!k&c{_BbuH9LHmU1cLhOoLYs<LTxmg5e
z(TTCO)@_cYWfy8hIa6oXuizM(?-7cVGV#(`cJRehZ{R#pM|T|<sGgAolL4T<i-N>H
zCqr39z;Y~QvdN`X(uEREYpT5Ceb~!uxX;V#`jtZ7DdOV;;l-)jE<~XCdScAWns3K1
zEy_A4OCwLCvTwQpN65&8Zl<x{_t~>g7&3E0{Y$N?RyJ&euoob?#W2iTg+E1~D4)6n
zM!kfI299c&s=4+_uF3kZCIO;`B{=6|V<8rJslDsqb@i6@FdN?4rDdb(m!o`E*+AOe
zrF};_mQXG8Q%D*E<BX_pRxSng={3LQMcE-BKtMJpK~qWwqNZfacH%WmyB{clmA|#C
zY{x3tkA{cb#97cbNm0)=oZug>5<<#_=%xjj2^!uT_Ak`yP+yN7#{f=32zp9}5<hHM
z$`P;&qn=J;PINr!0_50X=S^AVch)1y>qQr0Mw`2jMWJ<yl~2p-IML-1I6Nl#7t*Ox
zoQ0q@=1CY2;lLH2+{9$Hlr5qW&mlOyE7x&Qn=h26BbjC`&52axhaFaj%h3hUVy#~(
z%;SR$^eF2DWHW{&)Br^nIEy%QX}lY?Mk2(X8DYlF;_~g><wjB+p3<rN`4&_aX#{e2
ztKj!OKI4{a7i0LBw_7wI_ig;Z`$nItIb4z@Ip`(nK{bhc)~`XoGZ54WO^FYU?W=lh
zRu_}8Vxeyh?MfuEtUjwPQL3?5@E#{p^BUn_C-5pzWsQavd;>V9WquxjC-fwhK}x|W
z-|`uZSQHyY7<$^NVdmXrp;4d3!Zm^~SC*8N#WHb{fn?Q^UptPW(2Amu!35a4QgqMH
z6}DvJmw8Y-uZF5Z{K<)nAoR+bF{uH`MKGA)sE>7kkZvd>nQ2<LP$3Zb#Y1IOFTd!3
z-Z>AE8{RHE1<<9xfn1+%(Q(B9{!#5_znY#IrENb<D`-*f;qKQmUIBceMRgdiVPnsu
zuWOd;qe*jM5{Tco)3ENY<V2UDYUYV;cK(2XZXGMuwVNZdkQcH_+grOLqvhT1i}i~1
z^Q}1VUzzxM-0SF3NOs)Pz-&sJozfM0oYB;l5L&va0+5$I@q^W&5HYCOQupEnYBfUk
z!%2>j0zAxJz%zqOvtc~stJKcTs%Xg*Ig4?v*QJubIcvK}bX3#iy)f*QMFmQ-Opp|J
zS-uwScG#52MG11muhs#CcsjF>097JZ8iLChP_nXLs?g)BUdp?G%e*=B*-jgw*f<+Z
zXz4&rK;Mdi_J`M%Lu7F0l>+qRj(!un$&u-d^V(#ND_AoFcW3^u*hd;K<_&5@9R`bR
zzG}l-j0M5T1<JajfVdN-+#0hNaA=Z2?FU1TZEUzS)c)*jdygXMw@2x@OU)}Vp+U?D
zo(oK?SCX))y*ZY~YiH64A0;S+AKeN+p>z(h0c?3~80ll=B^RHTA3pe&L*pBs8RfXS
zi7f(n{k??F1=9P;8)E$BwhC7qgY@w3w=kZP5%Y>=8g0~U4n-@mfvvxbykc;7_JwX$
z^bC9WY1`7vuJEAa*C@4HU@I$*Qz=pmh03;W8>A~H{S!M4)vhSpPj?(z@ylR)`a54U
z0pFb$*7t^&mW6P5`{NyHo~U}ndoy&%N+p^gmD#1Q&N4Q!R6&fn{WZh_ftT%9`q<S1
zqPBAK4Ove@0b4vFpgK6#1J$f;w^)KQ-&_j%RJ`U%C|T>D?~+fEh{6_*+}tHWc{`SI
zn|nyJj>Y3}7!K!1=+Cug?}%@sp@t2ffb>|2zS?U7OSr^ejmetRX(yRjd*k8~y#pkA
zPro?`8($ILBZOI>8F!rwUt>(qp|0|vH4X(A(`IX|^ysZ(rgm#TwJDCi*L{D4#3*$h
zJ=Ts`?A@isc~@rW)bA56o0(O7k}-SB(p*Z9r4oKGf`bz+x1v_DVbEq9ky8|v1gsYZ
zVTe~%o`&rcETnfiALKEUea+emy)d2HA3F$%7wmM5=`Lsf@<^l#%yc|G*joe}iVTe^
z|HKqU?ypC=!NeHcT4c^a1KW1HEKw9Hi5^{Az?_8`IcU$+SMM!fK>jjyl<LEGsEVRo
zulG3(^G7ffsoA3Yq_bb1u2atj5#S5~H6(Mb6V+_&%RHRcL-tm6R@s<Xe+16{CWc8U
znMRblg2bJ*G=W(`@!T5%$G8xFgH6+^-DsnKgKjmIM+b5q<8&HMe?sxy%(t@}Z%Ks+
z_oz0dYRe<@@YEm5@cbw>Cc)WJIWv;E8#~xpR&?TK-2NSc@-Ip7jGu_2Z2(0*<rn-^
zKh*Ln#G9=8cjoG8w$OFOx@GNha-X7xXbVLZvJuHy$t&8Sf85E}NJRNX8FL|5SNpBH
z8E~+ZKplF1tV36^d`<U0KvG;vbsxAhbVeBSum@igK;apSjK->$eUB`Rs-M3DW*g)b
zZr^z~m+ZQT-29ou+rR>=R0dGPy7w&f4N(V<JVHOb7X~%=-zNp#tANt5s?%K08MT(2
z{6+gZQctm<PgC@ku&Ol&23ni7e&iswyN1>f)mb2%hIbRNwb2BJNket>&n>46m!NJn
zyq*PXUM&q!Z;=Bn^sFy~>{<@fp`S7RnC=wGl7%(Q9YL+}G$`OYGXM);${5IEADB)0
z=l%SN16rG-9ro0|g2`c|j?SmKrJTO)?v$2HP1U{*8Oc7RI5U<8Pvc)-05FLh!&&SR
z+`r;6@QNQa7Sx~1oOZ7;9f%(`R5W=b59PL7wvlp$BXJaVhE&^3y*@E3?qYe{L&m_?
z#lF~;1@Pm>Mj!9%F9V`vr$Yq&)}m$WNf_H=8gKVo)M1JIukpJUTg)JGyok;#B%o>!
z*C1TlQ6T-QKGzx}%}}T8c~EYA<3EnYUOeL7kzc?6Ig@wi*mCb3eIAdgI6`Be)32}g
zXrH6nmNn(ufuA+&1^dzKTV6ksH~c!+c8TuyWH*_NWriGbGzq{CDo@$6GCk{W85IgQ
z*D&WEV2?ynH<0-02ZfpxEE)H<@{^d78m|rJ#RoxkHh3eP%9$xRer|t79?++;ktb^>
zdX5<YcYj19A{u;-4qpYXmx9$qk60kybT~KJ+a-vS(1EDM&_KkfeRrT0(%?pKpELW!
z@B!$1HNVuHdjh;r^yrU*YQOy&CG1piGhg{Nuq=~LaudbT0~|)3d-BHbJ#WK_#*4Te
zhy^~4@kTvmJsMgI_*0+kS;T57J)_Zu(ZBu1Q|6^zKO{64yDwInTy040r^mMB)V9|Q
zt7_+#^CL74F!*YyFY6Y&7u1Z2Wm2Ivyr2Ws;K*5yJq8F}n!F%2nVor(Hj#ySkI<Zt
z$ZRS<zY-3kjMH(CW5O5!n#fy{W9h7Ek^5QK*H_U>x+WG|uj-D}W}VVad5l@!wxb*t
zZ3@$7PAZd-a0(kO#c8~peBSIlD>F@mB4imwnyyQaFc`|d+UDV6x6I6-T|+PHfw5M+
z>gt<=*8l`!42DZHNyDr(Fh0(u+B8MxFI&78Xxmv1!`+l)5F9l_7polw6M4)#Oo>nA
zhs}<ybuUy~6TM3oETbn}JksISyS5cM$@Z+rkDYDh)6iHx`9kh(O4vAI(EplP4$^f=
zsQ5x2D#J(WF$Ua8`hfV`oS{3pcIzX8fsNsU0s9aM8hu%}yrKUYWd|BnX@Zjj+o}X0
zOu&Ku-~>SQYC7;Lpg=Vr!GGu3!N55G%(egbg8(L0o51G%nN@alu>_)369I8*P{8Ma
zR5d&hD3CzbP7I)H4IPBy-z5RCqlN~m2|WG(Hj|L}KmrgN;eUsn!NA!58yTz#oFD!l
zuRk;M5EQJyf?90Ce@0;c9OeWC2B!Ky+8V_Frv<u#cnSaeDh&q4@;^dulz)Xdz!%Wp
zbf5|T0i_sde*hZce!>6iUcta<{>KxE@E>6fCMvM37LD+~9Ss;5<^KqU82%An)DjZ@
z|Lz-%`F}*QO#g^9sIY;Wb$|1a<ogHovLgel>O}qk2Z4V929T)!uL4%=AE3og^fv)u
zVm<C3s4D#r%n^eHPSx}O0dn&H0xY0V104jf#-HtHU{nM3A6wYp4GC~fo(w45ga(9Z
z{2Sp)`yVK-%<vEN{|90j{sR>a5rOU+IKb7$zX>cF{Rgr%asL6~CjS8`O&ou~i{-z7
z0r=632Bc~JdqA%3zYquL)6Dq?<U9NeJ^^7Z2>vMl2ETXt57cXs{{sr#{{uE!#Qp#)
z|Nnp~Hv-^kD;hAU_3r^b-~KU7c{2The`DnY{|j(|3T-@pz^}0X0GR;ve_VIk{<`i*
z{9_;qCI<4iGyMUh(f<M_pg|iNaJ2oesz2@@sA%{JNE`Nl?mQiT4TOpRF@$zV`~e2Z
z{{nR2N5|iIE+v0}!JkEM^`8X`Fr|qQxY_yF_r3NH_zWcIQu(uas|PxFDWfp|sS=n^
MU|=tee~ab+1AzA9+5i9m

delta 10680
zcmY+KWl$VJw}x?dSagBl?gZE1ZowUbyE~iU4q<T%?(XjH!QGwU1PFRbzVFtpJAby{
zr{6Q(b#|&|PIo6oK~MjIin9ZaA@#CiNZfyW7W4m*BLQ<f*;@Jm0k;V&o(|29MBa3u
ztEr+`S@S%^C)A}G{;cMk&<KZeY!4o}CV@p_Br(sWOc7hc$3iru?OO<g4VfW?+nZam
zFV-K~8oyNXK=?&c1Vav~wKGhP61mGH#Uh>)L5(fb1@yp87+O0(kBs87Kn2RS&Ie_j
zA-F>E&z|yPCvu-qH8?x0TAfLnCHrQwbc}t>5QJ2ggGXSv-=-<5144>JLN9P^flZ-U
zk-S`M7Wg0_Ab26bWRSqR7N`t3@DQ>YNcD5If5Y9F{%4I2_MQ|BLTv2%X!ZC)O*MSu
z33f5_Q1Ulf2iv@G;cim149L&cGAohxwJzod8D3KyF6Q@#RSv=s0zGQ*h`lx?I*_Ne
zlIifo?)?(en&qqe^h*b%S}ZfGwJhW#X?k|QP)#QI+hhrw(7bHDf50VX*}LTQf#7CU
zd8IM0NtZE^VHSJnNR98jXg|FK#N9sgk*OytoRf#QpqR7DX_W^DbRD~)wRjJqQ78`2
ze+iUuEBwSyqEzV0ABD)@ASc0sousRGQOk2KH=l7CtctN9*mdV&I2$;MmW04?C|=-{
zSUtVas(YdncF(5CT$#7^L1`FG6C@>HAAso$$6YO-(qu{T2x&Z4rqFK%h|pLT=1&}C
zatV4<eSwtSMT6uzjz~155=bZa%)wz^sNObu;ruh5+(X@n(vmdKr3NTSAye{t6`hyB
z&8lcoqLm-<Rc=_^t?(Fuy*p(_aDnkqy89g1g>q&$`r{|P_J>agi5Pn76d)H%0r$%k
z<#rx)<1=6Ka>6XiUtsZGe`xbxDJn+gB^c%rL((9&%%Bq75c?0k?N%Il5T;f5>Ag_6
zLy-*T3y(;f-`A)16&;y8I6R(UJi2x^*v>((N{WiZ07++U20h@I9br0toj}TDJbov7
z=ov+V(M8g_h|w$ixx@RT0*8S3A<hgQ%!;M~(y##m)rtM7m)BEmi>zunlbI~#vd<1$
zala)fFmPJUFz3sx+o?7}o_@Li!eQn?otbK<CJqVPj)MbW2{TctiHOM0Ntf<uKSc)l
zLkkBQiuz6dGOug7wU{tF$as6Xex6G0dV2zQLGc9X(i7s`E-4DxGvY6MVX_b=2LZZ3
zzwnWfd&5cbTqH}jh?`h+VONI{r6fc|$6$BkF<J06goJo~M860E$Y9aemSq+6MQ@Jh
z_QK~Z`TYF%_U8K4kP`9(GASDOy+igDh=SuSgB~}8VEIFe1_ve84rfPP@}j$YaADgl
ztBlN1r|K&Z^JsCz2Nz9cd}6HjL#4|>*y*@2W61&2n6vC1Q*=D|tEF{`GlCT#SWOPa
z@uQb2@?h<d2u;^#6_lrQOli{g=}S%V()#q)%XWq6TnrZ)55|2*FpG$Nu10I(xmg&i
z2vODWxtZ8h=qHg5qu6vW)vD_xjaMAyTdJ_2H`<TskBGXS7Er8?O#BW79gK}YqODoZ
z!PtX=JlQ61A%z81%~`Z3JYo1_8F(ZV1u_>A0nn>BMLrBN60rel9;B;*fMj*yLPze!
zLG%3eBe2`KW?aMzsn=$(ojXSq4_e7XRDioMk(}ohDmx!ZuLU4Te_LI@x@g|o7V~a9
zXTOw<c1f3pCs9`8>dVR%Tipkc@Al=9i3X!IN;5qgL$gIk;YUS$M4*Z&%<1n(zL<b!
z)NqN}-+H9Mhxtd?d@;r;vlRT6JSd8?b+a|+(XR!UPQ-bgi90U5vrbedN=H25QnX!3
zQZv^<rUbCCrQgSRdkg9gqQfy+c(=U^)q`Db%$2ZtDomW20!!0krYH(PAC8vQO0HTV
z7=AhR9;3ipOw2f1*(>spb8BDY%93ExMCBqaRM%~23UWu$2{6@wRi+77^`2R0QogTQ
z@Kl|yc|&*3;ay4q4!J{wD*L(_Zz!7?vs7`F_=T?o)19>rQAbt|ToJ~dnt4~2ReLUj
zG6qe(xMX_Hm$)bjjI(G#-&J2aweazjm9O*!jkq6vs)#cPVpP*P)$~`EN7sCAaAVve
zho<3)*I-h~(sw&5HbsFY19@Is(_VchLD*%lEY_lIzTk=6br)jc;hox*6R4H9nbeqW
zTu1CZ@h4y@eLw<lR=)BX^p3#{n+@HD8GYp9$dH$<sM=NsRFy}A#s=fu+C!>lSr&mk
zAKY5Ogq<Z2su!g(i~C-{aa>zX={HSYKKJn74x1#<oC9^~9cS%o768tay(T+d5giuZ
zU<GUrMQ0bQir=rl2MIEMV=CHk01fBq0c!q8ZJxG=`%BSFRJ;+kePBZW!Bj9Vyw;zL
zGs_1rKrZEjM|ue8zF0R0XED4h-)fb(+EdBe^T*Oo;b6OgF`=TnL7#)y%$djT)4E^H
z%X!?}qJ9&~uE#@Q#HK^L*z@Gc0|w~JCznPwPOaskMypqO;*#r@>h<W}hp>_rJK`j$
zS^wVoTbuF)w}r=j`?kc3Z`7+5G$f|}oJoyxiW;94hwhj_c*9>ghtsH+EiCelnk%<@
z7JqkD0oJBu9QHsMkiWhmMW0eDsz75l!}Fiq@sVGHznz9X8*TAR8zAfaiE^}14k6`j
zF0u%I>)`&mG3$Yyxpt;~jp`dQ<vvVymQ!btc9xgwPmjJen}1$bY|5f}sX3FmQ<dKb
z_j>)5e_}rlLMK`xZUF(%*CcP4TrCm+x0NPF>xOj>HyE>?VHzZNFGqlmQqtf#DcTp>
zMaXkFztaG3)w;Z@sG$u>qwtHNF?`<D+0~|inh8YITIbMX${ueZ*_oyOC*p=6zPNsH
z=M9=bu#<2OST~d5Eq@|2pOFDumV8NfutfX_cP162n=(56v<%2d4+|Of<ia#^t3&)q
z7`B&ZO<>Nc9FmC8NMie^E@?Uqu5a<@B8k0?_dGsIQ>aHD9aqP1W*zbkdgebqZ20G~
z*3otfX6+cLk`3&gX<qdu+bf_~Ct@FL?>!=%C^!ePNVu^FjW@gE7qfQE`8Rj?$$0bv
zygzLqjqJl0Re_#$R^B1R5|y>FbGL066ZtocNaqwYuMAj%K{{uehm8JNo@fiNV<ZDV
zTsoG^0AGSx0oJJ<`WA;B;6^WszkG>@beH7gQ$9%KF*JX3%ZyeKv>JNiT!A>&K+U+A
zRxMs~QLU|C|C_pVOru@wK~sa9R#zL=>fQ(RAhgNv_`MVK6@!B(kaQ++^dWXfDoWB6
zZrwBef|^matd@|P(|<?TF0RQM(D#<hq!6PxH6&0&AxssgB(bsYLhc+rCH~<W`45t$
zKb2w5aMiwC^mC!a6EY!3^qjSl1yskeJS(BR#iyUje0h@du9By67CN6^d@%@*)qO9m
zRVs+}0imuLW`w+oRU$OdE0F?dMp?U-k7jb}`}AhWI|ROa=(}i1-Xo-g8eB&q!bX{l
z$LyMrvgo^}l>zl1gVObaEw79dUa&qI4aAxPKmqOBIJmMsGzf2af4|BGdHkW3;2|I;
zP{ArPz&cW*kB}fMBfWXI*BH(jqUbE{ky<8JbBM8|hLyo2QTD-Fsv#(C+$1x$rKPBk
zO4myqHzC@LV<MlrDKW5mlj_}PRIz|y7$|DiT8a;HR+h8Dl}@@V^#xXGg}Sn{9nnvj
z+-*tym!=zQ9v3Z#8BdwNJ1?GZZK|NPD1NXjlQ*x#L^pyS^Io^bG;EeYa}o711J6H;
z0XAph{n)R{!x03IhzF#1q`#X&p1=QG$b?7N?L!o`)4Xq-?Acg{Z}o<Azc^WDZ*H@&
z*!=c7xxNak-r@E5O`H**;0$AY*_vTW+9Xyup?<A+>$8T=2YjV|*z>P~xQNTIU$ZMc
zH0E2`#WmzXEs`(cVwqRX03m5J*xz**r!4t<3)j&-(yTQy({CJH0ED*BlVx`Zdb(#{
z_eJSS<;Nu&vg`flvyc$1<vo>4@&>5o$1%rGQ6<YezdU3ER?ldlgQrODLhl|-Mg6Aa
zTd_g|f-L|1(%F+Atn&&nO%gVC!_@4F7T)z0I|i+Q%qe-&qW)lu^3T-J+jV8Hw=&_^
zCg|VS7&DaGI6)hTx@~l}0MIK3ouL;I(l)`I*lt>)_>vVtr9{Xi@+X{`l|p$^{j&9F
z=O@R?h`*^da=u0Ocv@JF3zJ-owxE!8D#)bCb25yqF^(7owF0lQ0X8V*xaG~9Vx=ZF
zuu>Z!e(&T#P>bn7FUL*L>9n~~$5!k8SYJP!o>U~}<Z6IQgCS(RcBJ=oOf;OOcAeu!
zKPr-5i<|teO1M2|jrQ^cS(`s-Jc2S|vK#mDVh(>Z9wh{yrnO>BoVyVb#s2grw4}GU
z94T0)C-AI!L_|p?K&C3SnV{o~<7e=|BqkxKqSM0~>m=p78O<Z-fjj%cNl{hR%I+Xj
zKy6a7aFX&4Bz7Cyuoy!tW~<7Ld|RP{8QSSE5xY}a)<S0WY$Q^TU1`5T&&S^b(^L8J
zGn@7%UC{pBNZN=8L;RK*<u2gyvUs%8+CDYc3_w(S46Y<9Mn8ka?@|LF*U$Q|aZraK
zBuU9%vOvk<ZcLJGtlGT723FWPyinV#<yo2r1#u^u?Ogt!-0rIZuxcVRA_k$&;X!<c
z^9gg)fP64wOd5V4+clz7w99zRMv3oC)f&M1j7nXKDrVOn+JlWBrz)jc>L+)=)wv@l
zTcs;0yAz9${A*9pz;vUwKJGl8^RE%mIQaC%v%4Fyl+SOzU+PlDgs>)ts&G(r(A8d`
zKVzjJL{knvfNgT6#;L0JcXfDdnTJ)tF9G}}v5}wxUJ)|S{(c(3Xhi)i28{YX8+I&z
zDDPhEy-F#O5<3}+WDI<s%KpV*QAsSfu}|U<OBzqO8cKLR)}DgauWB!B!iRFuR_!x^
zI~7H^(bDKVB)7k|qfzK%IJdIV$BWU{2U&;i#+{9@%uBS@??J-&SC16CEzs~4o{>#Y
zS_v!~BEN|cC7}#XQ$ReJg!h#r(6hOzyPEO>(Nk<DlE1W;lx(YhkU8HQm@GV?JkA{y
zDfmKKXvrZoQpaTxlow?C{p?Q$U7Gd8HzytmnWNHR>l8dyXz}33+N5Um6x|npJyh_8
zWx;s$ylmc|D<|QeM7o=R(}FAF*{<%`z7NH{xpy=U$ExofN|U^2_-x0DYXSoZ<)e94
zqpw{X1Rk&y_lQ$*HW(qUY=U|yL7~Q#a}${htzUd(BaytYwk>1k5b|$8aM75KwL{M(
z%K>+YM~}HXA+`c(cBAcT?zW6co#8-wxPUxN5IF(GpOYWptU^2P%hP4^F|w1Wf#+S>
z<DT^5nO~Rb)c(j_3T$aGZpph|Wp|2I_YSEK`V&ZrJ)W8i9CH+)&3@7?bg$2#53B{|
z=FlPLuF-L^-mkFOpmJLfeZUpjW4a)&$F36ML61@XM_*2pttotf7w!w2&r-w?N5OFP
z1=~*)QlwQ#?$>yB?sCJb)(+F1s*ghx7E5-&rG81rc@}}!Rv(Be@`b1O+B^<+{&4wQ
z?p$0_)SANsU7(s+?K$``f<fKF1P@Z=oOVC^g>AG5O<#>n(iJ2?Z@~-1)mTwQwyr*T
ze=hIX59@tUpBd&y$vdcc*-Zw@yP4&XbH9Ohsp#4ku*0dbKQCX0&W@Fifl?lnp7H#W
zikLqb*{Dxf0T?eKgnQm-3E$+RPAw=^1U3eg5|7CBX_OLh%l_!*4;MA^E`tX~DMS)=
zJ=b042TsX-6P*h|T5K>xn`-7v=5iIAiAZV!ijm?}(B9iB#$qI?6gMcT>GM)kwH%t#
z@~Kt2_26|;<Udj^C9=m}nL0_y>)1JQTI{2gDOIAX6qZZYG-8lNOZ}i2vSqRn6SX9s
ziK!G}Nw{Rhh1*a@(3;7_^~t_mokKicxs!uqKfgUqhiN-#+<HSHeo#hNz8)}X)K(!_
zbsW{SVr>7#GWGLpj9CmhZ8*sn;>`2H<;v*GIzr8<t)aCt%^s=_4xcOoyWQ}wnR6m3
zKgk8YgmGoVFi5FJ`AIQ1O++|_>Jk#Ly0=TT@x*e<m60(GR6KhM7zZn8Gufng+#+Gt
zh5MQK%JK_?Y?9Yi$QDPv#TLw#3)KqDO~(?rmPKgc;GIc<NE*NG$rjURm<43bde0k%
zv}P?Q+K)b+5Qw+!!%e^+1B=$|InC-^tz+>KwT5mL*>_<Bn^K+mE1O8nxsKTjbQ^iU
z4$X#Jg-{MQ;|qzG)sYnrSWw1&0DZCR2lt)8g#7vdYI^2fYHcv5PnYsGE293&a(aZT
z=8j0l?&&d`^i8IuIQ%SzvQMLMRC6>Ng`l=5%mwlrU6VC~Zb^l$$1oDOAm^k1Pfo#B
zI@>i0q4t7UW(kunI`|A^#fPvY-T8?r7}}_Sg-?+<&POS{=!CtFI(+j_9@N;pSYnd3
zX0&S1AY@I!+owztf}{_|@qI`#ii%{JU<HX!g+akdsob_wLy=f+W8*TOT;>rDa|!%_
z5HH(Fk0mySz`Q`IwS*vlMtUN&<&%;EMX_@vtrNaT3pPRpAA!{w#;h3ALR5OSo7ltn
zLDzgi=UCt2IP~iXcJN){8bdpBV)TF~QSR^~s6*G=8zFX$1s&fxmo-odiOWy?_9Rc{
zhfj-zdhB^vS#@(^jkL-u-PgEK53Hr!)S7%EV%Kp+YM-V!p8T9$f@<*lt9lmkpfj|A
z7WrT^OFD@6!=8n3iT+HzJ(gxo7ai<FnFPV;AM?u!82iu1n*1?kx9P-h>w4*tUcQru
zp!8VIRtJMV7+g-y&VXQ4g({<;+7>rh7U_{wxI(%r-{#j^L&zZ<yos3m_P=tdvh75D
zRz@6>bAo+KcA6Y$Vo*04$@@GGvuA0Fq<OYwx=$_iUX!A-m|{vXotZV5(dn%k7_6A<
zIUyxB?9=IikeU>8*Nb))z(=ldx>MWGAnYZT`5(QNICt{hi|3VYMb!?{bfsvH6?Cw|
z$&+Lv=g8^S>xY<>pX}F32%H-T=;;^E?Tg)%J}eukm}Y!Zk3PjYnA6CB_dBOlJPoUy
zH}Ha+Xh=MC`msf1>2S~Ui6lQxM+u2k?le2VS`ho8KTcJMp2zKqDfAq%fI(?i9po2*
zu3qn`)}r|QNh3DnmJ0k3RdtfASCuoTxx(p)rlhcSW9U#^K`R(*A^Z6|qCnZ))KASH
zqj6n4!R=okC59yCDy6K5jEFPM1eq2kSM{WH8)v`sRRf8vj)_>q6qX{1Fni41S2LT@
zbuS@Wf2+pQct!i+3V!j%X5KRQjRozJnuMktfrD)&lX49;ws4QTzpe#|67-YsM(Gl7
z@@CzAEx&NQ#p;wrr!)2UBB+|S5WxC`ggxih8MOtJV%DR6awIX#8`S*1N@-A#&XTO}
z8C?eFrXRh?dsyf$+`E|h6YLrK=m++HLiOHm;yLW8Qq7jpK5pP{*2vv7c>q0s96Ibe
z3mT9ET0z)l^{00tK8Ns~{HCc%0&QM3BzJ9SXsjIY1&-N_+349krKvq+f{Sgfg<>}u
zdZrPR=bEiYvpOGM3I#UCfc{U#^Jh_UFU5V3oZDzRM#3s+Jk6XuHI2M@YU!CS)%`PE
z-Z5C`X`#Y9dRFJae{%rk-aoo(jlr6ziAEr!oL*!Fot8@~na=-Um3Eijq};em><T&S
zoGBG1y=*CcHR;wIRQ^-;4biu2UHw#c+hJDa;l8MP?rM{?D3I==#=`N5a^ttc4vi4i
z^F8A8J<MxWhp*~ZdR)BwE{e5vv^AZ=lSzfo2P!i$6i6oy`OS9FL!b@?Rid9o^)Mza
zb!g)8c0lKWLtmLmnVE5op7v*^2H&iGW1CAHAsUyAx5EN@aOIsT+mBEL_qb`G=*Lg_
zVOu&&uIIGG4~l%oQTD`#x=_0)L2btnv6pX@n_0d3o*^7lyCm&j(Ps!Q3TFLM?x&tE
z^)rUsSTcod3Xz@PKYa_W+eMo|^FPmYonaM}Wn0L!sWoS+&ur&9oB`|H5gIKzmD`Uz
z8pF;dd5s=<5!<SYnZnT#<3|JuW3nZO8+aK%>0@MXk<v%jpMZJLa%BbE8Jr!IHfqlL
z4yFyZ@*{=u7Rm?SmA5T);m>*U6X@43WY%xhE@={0B&oBY@g9NYow-=77op_uu4x=*
z&zsXnp5Ah%vW@4o>#lHPguo%|Rud+{NUy4ig5|pM+ZOBsXNlQUB}3m({=5Ce=CmOw
z0wT|Z4?-cZo*6DmMpU~_fX&67guJ=d`etB1QO1!O8Kn_v+}R#ia?NJnxa#Oj$l9+j
z2ootq*MLyaWKNCpNHNRd_zQUE)FvaYvp)Uz>@L*Ap&9p0%L5RU+(A>Lg+7<h^5mJH
zuqNaR$Bi>(3|8cxYjr({ks-KKh}dVyO^y4B$eR#Pfn#Jtz*9nQ`lq&a;VP%7WaY4A
z&+2g!ulTM`>l@2;wP9|PK&+5&Fo}0s)&qIRML9HRyzo}VxqFR81|FZ7*v;2LXva2v
z2q7x;<6cS>c7&OH=g>ZL0R0NOVsKb>3$XhXxB0SESFEO_r9OmkbA2fz{>j&_a?0SD
zE&A0+O_pSolst3RpimZjoa@kX0+DZq(kD<;Tg-q#xtY1hG1FI`#2u#+96LrcTmsY_
zrMPC6q1S_K5|B-AZJr&ElHFrVq=_BFeqNm7ImH)J`t(Zrw{9K@uhN4-hk(E!`CB)G
zwHO&dtM;=Z7=r2fjl0eEX;{pVIy$m4P;+{e20CQo>XiBQ5-<g-hSP(Ll?;ZxD~ba}
zmjpN^A4nb`gpk-y#XI82ZI}7^T@D_`YhF(8V}C%9Y=_4{^?hO#3`K8lW66j^m)HZ!
z3gIIhyP8a4t4f9Ecz1`cA$sod^1ncD7ovEB9Bw8eGta4^S4~+L*1Kb$ZwbU|mQUCc
zxOVP)MS^obo8u^OXz6yGt$XYWVRNL+s|ZSMyd>n4*DLn{0}sMKi;IOMnjfN2Ci?GH
zG*GKipET$0UV9C;n{U%ssu=i=d&ae2=W0cuW+8+;O04;qvFbIk!bTex?n;^PBR_ot
zb?(1>^|sDj+82$LGdvrTu@n5UDUR91INqlWzIa0HGdUE-t-_p(73zOeo@D^5GvJ=*
z%A5}pq#Ba;JTG}Eq$I=zgnkhrx_4VMO=-)v-G)p$?m+!a9~MS0FYs}^A6sUUEIEj^
z&52t7YDN=UL()VO0F3;i{JoPrB*Zx!l#7LO<jR&{)f53WXS_I`_M7;QjoD9P7ugJ{
zS=1xi@x$|kK%VD;k~guAx?AZBDl(|a(kt>KR9qC5&RBEwzSE7%r?ND^ph1fispeTB
z$<u^^Nwf5RwI0sQB3rI-cjv}X8e63y+d-Jv)UnDLggOhJC^q=KO*t~sxAz?`6nF$q
z#Zu#ENC*f!=zkAI5i=LalgNU=|841NWYlcL4a=gm0(<pZd3I)++KLdp#a-|U$^O%N
zq;Dh3_w%*c5ykBCTDmsnY+Iy+%zD`6xq7;?VD`}spP-H$k#D_En<MdzV}k-pxouAu
zPhD637x(M;PuoKm9i-g`Dn&+#BGG2Cp$#%jd^w@JD+%@?MRs-|XVs=Y{p;hf`{@FL
z!T^(Rs5JF-Ou*UkE61rTZ0|YDr8O)oJK!%M{;@SM!ZjA<PU=x|#k-Xp>f2<wYnLg}
z!2{&CGcOa04nM(;@15VazsC$$cdwX_$@8Qgqgd7Cp9dNmb)0I7vFEI!Vr%FXjrbCO
zKPPKh4{g9P+zVX+eVp_A@`ZM0ac-9M$~g1ug%PKDN{EYec5$n@bawMH;XFW3Wc`m2
zH&ygfvHerEOg86k5UFmpy66Cu^rI3DP_WX3s1doGU@_BRmE3#M>YLzvWKXen``(Zu
z4B(ee@q%B`&L=&}Y<U?Y@4@TO-pjP*wJ3@7?xwLKBR#Hjp#9)Ag6o_#<shP+<WU7O
zKtu5^wG5=o=WKrow)`vSGp=HUU96omtqr+v$fd{+T1emI)XOCiZx*dmygk_c^_t-8
zciHr>ha;?O$R@b<>e`N^Fz-gPxn_(ldZiKO+$&Q?^NpP{G`}g#OCdv&ZN+9poPc9Q
zx#*i^vl$r@L0-E>i<)ITQIexYcKT(@<LkarAprZ2CXbMG%jLPSUv>xUzoZd`C~kUa
zuq3clzYqfKoZC!vlV(kpoX>Os#8?|{R*7P*nc0Ryu55kKD>CG`uBPaPf#{Dv18L}v
z080&&I++U(&GuzS;3zt-aW=VlKaqhC2;(b^75a-!pz)zJ*C;KXr$M*J5&96P%<dSO
z3B@A=uP+ihb_^Sqv1&4AJ)C<-XEW3#m-v;MmpIPFaiRc<=5Mx{@_f-X_}XfjO<m^F
zt*&|!IFv4_TzqL47+~;^upHGvp+XZN_Ah`&JZhBy#f+RVv3Hq`leY&H8!QcMX|gz1
zX7Df_NHEQn@e>f9x7lpGHg?bDlMdd|gbNLPzGM@v852fvqK-hek?K}1)xfIRMf8BH
zE~FJuN3~LdbT*!?XdsQtH0i)yN@`&)f%j}EIwd}lmq}SY+ZczQ8@5)A*{VX*g_;l>
zQE<{oe?wSdK%w?%q18F?*NC0HoKUcZ^jMxhNXs*+-KP<Gd&c<7vv76&G}LKj-IOtd
zo@#seeyZcc2O@>8yyckNKjy!{FkYPzcw51YChH0a9JV+nuQQWhu<E1a$<WubG|F2B
zG&H)&eTF|3IvKOaMiF5}j+&`$&sbppFpw6Ax7w%N_h{V2=l)1zHT$c9;RqF8v$sy{
z3+Sy3mN5A?kVBNGi;7eCs@Xhd)B%eIOt&s~Sg};J)c}P$b~3uW%J4+Wy+Q5e$Y8H|
z1=s%FNs`HB9N%NN-IgF1ckY0ze)ZBE;LxLMCKfqRek^*EFQakq`GeVCy)5|{EqGqG
zz(LaqeuJ!f#cmDid#{X^MqQabr_>uH0qC*q^IEt^9ZW7s1{Bj9#pQsvH7>dk(#Dv7
z^;aB{c7xG}Kl&TPve$|x_E86YRE{HW$khRLKv|cuiO@D}!;Oq|CVt_`EwS2YKdr5u
zf-aa;u9G1Yp<JURW~O5m{|q}<ChD%cdy^R8&XC`gl#}N6G38;OFWh}e^QPU1Ge}_C
zcHK3<*!SjZMC=Gz0q2cmrT?b^n*Gw=d3z>B7?QpBWurdCiOSpUS>O*mh#GA4vIj;X
zsWn?a_Ckr@8hwg!0-EK&u+=OXg#zh>NqUlTe7~bIFiZnyu`;MTqpCc=VjzX$m<l#%
zZOnQ8d>#iI4b`F^y7Cx?oOFda(1ITLEZX*|)P1oxuN}b_asCWeQreEIc&Wpk1=kl_
zK1iKo%f@sBfXyNFcCoOGtb&e=mbtmiOCv)Xzzc$~%H^&XU*V$qGmfz775{>f;Zv^N
z8Rg{^Y@<2msa#qN=AsMS?#)91<$2YfZ%W`xcaWWe4+rw{Bhj;Bj|1L{JxKHF$*b`e
z+!;>*+AFddH=9*_)*djt)Krz|Vk;TI@}f!oqc-g(^sKO@TxXt^gbke6Zg*NRWTjW*
zA3^ty<IrT)#}=LZ)x$QK+e5p}UrBXqG=DCx9>{r*4v5|U!725pS+Y}K`>TT#vZr#G
z<Dm*&pugS#=%9op6nUgy79?@W+R20$_BvabmpN)QD)yNXJnV*iL-s*Bl{j<ER(K0r
z=$qem<*<mUpO1&l`%1G$;BFRn`{CmsE;g$Hytz$^-l~X?pMKNlDk(Kn+Q@tMRf$Z@
zNQt>eyMx8NycO>dv$~qxbwwAASZ#vnWYY3boktJ3uTz$aBfip_o`Cj)lJ-@y_(*gl
zS_A+-Qlu?DWlFZj#hl*_P}0t=*i%yG@&;3KV&PCZJoQM_0vk!@qh&%hS#sgJmgpN9
zOje)69ddZpf5p*E&i_nFoc0SCx*auVkP$?-;!-NF_ZxII&>Qx~5a<d`a?ol4^p4iy
zk?9*?g#77>-)lU(27(&2NiG>_O4U^;-o#aU^-d0Ol&TD7FAv(UpLd-D=K_&=J@FuE
zC4&WuZz`dXswk;1G;<QBY@D;yg{sE94A6xyxQr+?q4Zi-=HYD9#g-kjeR0z*YE0qq
z;7e7DWpZ9geszqkdlG<N+5?zvB>-7ll>yf7774*#fc8qX3DDN{uSP5nwj+BLK}Z2i
z%}bpKhMFI$@M~c(Xsy;Hd7(&EHQK<F@=OUeJdjSC#m~;JCAT^-ng)&!+GGIB<9$`7
z7IE6Zcbph!iLy4LN5-fZDgaduuU4N+vlCBTF>RKpGg?uI#nl{vfFImcM&Cpqho?Q#
z)R_0G$n#f>7f?w7$W6Qo(hQ{n$>)zN9kT^c(}eVWjao*MEYJGpc_8xAggYJ)ILH)L
zlu)#md}$A8&{HbW4Ra?z-zDzPPgz0RE$}4xX_?!RybI9#J(kC}Z+QH8Lys3r=`q5n
zKC!LQ`jj@wyEb@w+G>5O>M8ivbu4YCPaE7+a5)Ko3CgNVRpwIph)@~ZZQrd<J4AMH
zZoRmlUBrG?i{5rA)c%9nq1)USf;1nlOCYz1!zUr_%Z_!}Z{Vaf47A6@R+e@?f|oa2
zLS4duOQub6>Y%Q2v@{yBwVpU-#Y*!zL92j5&c~?3yp1kf0g~@4&Y#Pjz9rG?u+tOH
zI;ZRZPzCV}y^*5((qAeg{YdROyqR}9C|=D_@kp^2aPweoia$Do{N9VF`e2Q;skj|V
z>|w%$?d0F=4%Zb&?N9t5h6HLQ*4;DN`nmI@%&CWS@?&7r;<C!c%J5Z?!g1ka0|_MA
zOpL7?a!ahuOa2f<qiL8jvGHICM~hA@xe8^(pL!7S@8dT1goycGhI2H%c=rbtRk?!~
zzUAh`1lltM!63JpGWME<oBgHBD6LIxBH3`%2D6=jgrzz4<nPOjW+!)eH+B*dSIhQZ
z6~c?#9cu(>m_07HG}0sutrd9$`g@uTp#AyC;&1^dI>QLe@&VMPfZa8=QG=X35>v(k
zr%@2$oKyT0>bcN28_&%i@{>=%b=LJ^GlHaC2|Y%7ec;J}JuZsUYca;YxE+8>-K2U*
zVMQS|U;9=$x1C#gG-(0T8>2KG5)mYl2~h7NZjrk_u>a)-4uqAFxm?USq3p@(MUyv0
zSG2%a>m_jlGth`jpW`&V!Tv3gu!3*L;r5XrAXf1H?JXMfZF#}|I|T-otk;Aj2WQm_
zKp8`V{UM3K_x1EprI26}C_1ow0|w0BgJEE!23#mesCUK<u4<r%%mS}8utCm%Q5t!m
zP@%zOMA%^MMtUg4zfB@=b|Wp!17z}l#1u3kIC203`0p4I6a<7L3<QMQ`#H1!y&fR>
z5Z|MKU<Wh|a7z;}@c(u}As|@)*Y*DU0NIQDUn4G9r1|d<4%qL2;ay+=|E~swfS~<<
zQSLbZCbiK_3iG!n07JImyoXLx{G*&LK;Ylp{3kUK5G?;Ml$83PDYQlCJ;IpnpHOZ^
z1xNDXgArT*&LE8AzmWf3kn#T$LgK{Wp?|%0BL9Fx8$1}$_Sa!9{$C&rrKSKD9rysA
zZlihU*$QAbLsBqdyX?C_Qu!wsbQr+`?HJ&`cKmn9qVWzz!5=#Qj(Vy2F6hC&1Ek=@
zj=#M*+TfZFgZBoGAsEwz4J>6z2sY^aYi&092iiLM-bJg~KXGPH^xlgBR`2>7i*5~e
z>hgbYwAudaJ$D0wMY{jS2DttMncZUVBEbU;8O{x!`1+pwZVa$!&)?W4?|<+z5F@@1
z16==)-TVDxtf83yjI_Ofjc=fLC<YGg{d?cNfOjDXzU<|B7i+=)20@SgkKMoTubnIG
z9~|qGd>5XP?}8O9(a-!YqB8!at+D_YT+#pcX3Kg11sLGf4j`Cn;BP#B(K~d0Z{U{v
b%O!U$ef%H-8Z!hlL?I>w1WwuCzxjUv+~`jN

diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index eb91947648c..642d572ce90 100755
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1 +1,2 @@
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
\ No newline at end of file
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
diff --git a/mvnw b/mvnw
index 4e574d9a02d..41c0f0c23db 100755
--- a/mvnw
+++ b/mvnw
@@ -8,7 +8,7 @@
 # "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
+#    http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
@@ -19,7 +19,7 @@
 # ----------------------------------------------------------------------------
 
 # ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
+# Maven Start Up Batch script
 #
 # Required ENV vars:
 # ------------------
@@ -114,7 +114,6 @@ if $mingw ; then
     M2_HOME="`(cd "$M2_HOME"; pwd)`"
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
-  # TODO classpath?
 fi
 
 if [ -z "$JAVA_HOME" ]; then
@@ -200,6 +199,85 @@ if [ -z "$BASE_DIR" ]; then
   exit 1;
 fi
 
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
 export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
 if [ "$MVNW_VERBOSE" = true ]; then
   echo $MAVEN_PROJECTBASEDIR
@@ -218,6 +296,11 @@ if $cygwin; then
     MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
 fi
 
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
 WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
 
 exec "$JAVACMD" \
diff --git a/mvnw.cmd b/mvnw.cmd
index e506408e362..86115719e53 100755
--- a/mvnw.cmd
+++ b/mvnw.cmd
@@ -7,7 +7,7 @@
 @REM "License"); you may not use this file except in compliance
 @REM with the License.  You may obtain a copy of the License at
 @REM
-@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM    http://www.apache.org/licenses/LICENSE-2.0
 @REM
 @REM Unless required by applicable law or agreed to in writing,
 @REM software distributed under the License is distributed on an
@@ -18,7 +18,7 @@
 @REM ----------------------------------------------------------------------------
 
 @REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
+@REM Maven Start Up Batch script
 @REM
 @REM Required ENV vars:
 @REM JAVA_HOME - location of a JDK home dir
@@ -26,7 +26,7 @@
 @REM Optional ENV vars
 @REM M2_HOME - location of maven2's installed home dir
 @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
 @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
 @REM     e.g. to debug Maven itself, use
 @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -37,7 +37,7 @@
 @echo off
 @REM set title of command window
 title %0
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
 @if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
 
 @REM set %HOME% to equivalent of $HOME
@@ -117,10 +117,47 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
 :endReadAdditionalConfig
 
 SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-
 set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
 set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
 
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
 %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
 if ERRORLEVEL 1 goto error
 goto end
-- 
GitLab


From caf52641f01539496876d716445b3d8e32d649e8 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Mon, 4 Jan 2021 13:36:34 +0800
Subject: [PATCH 18/28] login dockerhub before pull (#8314)

---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 9739c019ad0..8277146e3a0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -76,6 +76,7 @@ before_install:
   # set python 3.6.3 as default
   - source ~/virtualenv/python3.6/bin/activate
   # to run petstore server locally via docker
+  - echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
   - docker pull swaggerapi/petstore
   - docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
   - docker ps -a
-- 
GitLab


From d2aa40a935be8b9ae5d895ac47500d80470d191c Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Mon, 4 Jan 2021 11:34:28 +0000
Subject: [PATCH 19/28] [Swift 5] deprecate retry hook since its no longer
 needed (#8303)

* [Swift 5] deprecated retry hook since its no longer needed

* [Swift 5] deprecated retry hook since its no longer needed

* [swift] fix generator code formatting
---
 .../main/resources/swift5/APIHelper.mustache  | 21 ++++++++--------
 .../src/main/resources/swift5/APIs.mustache   | 14 +++++------
 .../resources/swift5/CodableHelper.mustache   |  2 +-
 .../resources/swift5/Configuration.mustache   |  6 ++---
 .../main/resources/swift5/Extensions.mustache | 24 +++++++++----------
 .../swift5/JSONDataEncoding.mustache          |  2 +-
 .../swift5/JSONEncodingHelper.mustache        |  8 +++----
 .../src/main/resources/swift5/Models.mustache |  7 +++---
 .../URLSessionImplementations.mustache        |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 .../Classes/OpenAPIs/APIHelper.swift          |  6 ++---
 .../OpenAPIs/URLSessionImplementations.swift  |  1 +
 30 files changed, 85 insertions(+), 76 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache
index 68d624fb64f..2630944598b 100644
--- a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache
@@ -7,7 +7,7 @@
 import Foundation
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct APIHelper {
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNil(_ source: [String:Any?]) -> [String:Any]? {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNil(_ source: [String: Any?]) -> [String: Any]? {
         let destination = source.reduce(into: [String: Any]()) { (result, item) in
             if let value = item.value {
                 result[item.key] = value
@@ -20,17 +20,17 @@ import Foundation
         return destination
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] {
         return source.reduce(into: [String: String]()) { (result, item) in
-            if let collection = item.value as? Array<Any?> {
-                result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",")
+            if let collection = item.value as? [Any?] {
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
         }
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? {
         guard let source = source else {
             return nil
         }
@@ -46,16 +46,16 @@ import Foundation
     }
 
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValueToPathItem(_ source: Any) -> Any {
-        if let collection = source as? Array<Any?> {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+        if let collection = source as? [Any?] {
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? {
         let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in
-            if let collection = item.value as? Array<Any?> {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+            if let collection = item.value as? [Any?] {
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
@@ -69,4 +69,3 @@ import Foundation
         return destination
     }
 }
-
diff --git a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache
index 5429af6973f..fd15cf35a7b 100644
--- a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache
@@ -9,7 +9,7 @@ import Foundation
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{projectName}}API {
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var basePath = "{{{basePath}}}"
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var credential: URLCredential?
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var customHeaders: [String:String] = [:]{{#useAlamofire}}
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var customHeaders: [String: String] = [:]{{#useAlamofire}}
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory(){{/useAlamofire}}{{#useURLSession}}
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory(){{/useURLSession}}
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var apiResponseQueue: DispatchQueue = .main
@@ -17,8 +17,8 @@ import Foundation
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class RequestBuilder<T> {
     var credential: URLCredential?
-    var headers: [String:String]
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let parameters: [String:Any]?
+    var headers: [String: String]
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let parameters: [String: Any]?
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let isBody: Bool
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let method: String
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let URLString: String
@@ -26,9 +26,9 @@ import Foundation
     /// Optional block to obtain a reference to the request's progress instance when available.{{#useURLSession}}
     /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0.
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.{{/useURLSession}}
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var onProgressReady: ((Progress) -> ())?
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var onProgressReady: ((Progress) -> Void)?
 
-    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) {
+    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
@@ -38,7 +38,7 @@ import Foundation
         addHeaders({{projectName}}API.customHeaders)
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addHeaders(_ aHeaders:[String:String]) {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addHeaders(_ aHeaders: [String: String]) {
         for (header, value) in aHeaders {
             headers[header] = value
         }
@@ -61,5 +61,5 @@ import Foundation
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} protocol RequestBuilderFactory {
     func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type
-    func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type
+    func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type
 }
diff --git a/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache
index baad56cca2f..d5b1c1e0a29 100644
--- a/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache
@@ -45,4 +45,4 @@ import Foundation
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encode<T>(_ value: T) -> Swift.Result<Data, Error> where T: Encodable {
         return Swift.Result { try self.jsonEncoder.encode(value) }
     }
-}
\ No newline at end of file
+}
diff --git a/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache b/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache
index b6e8d28fe4b..47c874815b9 100644
--- a/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache
@@ -7,10 +7,10 @@
 import Foundation
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Configuration {
-	
+
 	// This value is used to configure the date formatter that is used to serialize dates into JSON format. 
 	// You must set it prior to encoding any dates, and it will only be read once. 
 	@available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.")
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
-    
-}
\ No newline at end of file
+
+}
diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache
index 311b4bf3b31..1a23697a04b 100644
--- a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache
@@ -109,24 +109,24 @@ extension String: CodingKey {
 
 extension KeyedEncodingContainerProtocol {
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArray<T>(_ values: [T], forKey key: Self.Key) throws where T : Encodable {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArray<T>(_ values: [T], forKey key: Self.Key) throws where T: Encodable {
         var arrayContainer = nestedUnkeyedContainer(forKey: key)
         try arrayContainer.encode(contentsOf: values)
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArrayIfPresent<T>(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArrayIfPresent<T>(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable {
         if let values = values {
             try encodeArray(values, forKey: key)
         }
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMap<T>(_ pairs: [Self.Key: T]) throws where T : Encodable {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMap<T>(_ pairs: [Self.Key: T]) throws where T: Encodable {
         for (key, value) in pairs {
             try encode(value, forKey: key)
         }
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMapIfPresent<T>(_ pairs: [Self.Key: T]?) throws where T : Encodable {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMapIfPresent<T>(_ pairs: [Self.Key: T]?) throws where T: Encodable {
         if let pairs = pairs {
             try encodeMap(pairs)
         }
@@ -136,7 +136,7 @@ extension KeyedEncodingContainerProtocol {
 
 extension KeyedDecodingContainerProtocol {
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArray<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArray<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable {
         var tmpArray = [T]()
 
         var nestedContainer = try nestedUnkeyedContainer(forKey: key)
@@ -148,8 +148,8 @@ extension KeyedDecodingContainerProtocol {
         return tmpArray
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArrayIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable {
-        var tmpArray: [T]? = nil
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArrayIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable {
+        var tmpArray: [T]?
 
         if contains(key) {
             tmpArray = try decodeArray(T.self, forKey: key)
@@ -158,8 +158,8 @@ extension KeyedDecodingContainerProtocol {
         return tmpArray
     }
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeMap<T>(_ type: T.Type, excludedKeys: Set<Self.Key>) throws -> [Self.Key: T] where T : Decodable {
-        var map: [Self.Key : T] = [:]
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeMap<T>(_ type: T.Type, excludedKeys: Set<Self.Key>) throws -> [Self.Key: T] where T: Decodable {
+        var map: [Self.Key: T] = [:]
 
         for key in allKeys {
             if !excludedKeys.contains(key) {
@@ -177,10 +177,10 @@ extension HTTPURLResponse {
     var isStatusCodeSuccessful: Bool {
         return Array(200 ..< 300).contains(statusCode)
     }
-}
+}{{#usePromiseKit}}
 
-{{#usePromiseKit}}extension RequestBuilder {
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func execute() -> Promise<Response<T>>  {
+extension RequestBuilder {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func execute() -> Promise<Response<T>> {
         let deferred = Promise<Response<T>>.pending()
         self.execute { result in
             switch result {
diff --git a/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache b/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache
index 71cdb1da93c..e227058129b 100644
--- a/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache
@@ -41,7 +41,7 @@ import Foundation
     }
 
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func encodingParameters(jsonData: Data?) -> [String: Any]? {
-        var returnedParams: [String: Any]? = nil
+        var returnedParams: [String: Any]?
         if let jsonData = jsonData, !jsonData.isEmpty {
             var params: [String: Any] = [:]
             params[jsonDataKey] = jsonData
diff --git a/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache
index 0191a8fd84a..0eae73e1b39 100644
--- a/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache
@@ -9,8 +9,8 @@ import Foundation
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class JSONEncodingHelper {
 
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters<T:Encodable>(forEncodableObject encodableObj: T?) -> [String: Any]? {
-        var params: [String: Any]? = nil
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters<T: Encodable>(forEncodableObject encodableObj: T?) -> [String: Any]? {
+        var params: [String: Any]?
 
         // Encode the Encodable object
         if let encodableObj = encodableObj {
@@ -27,7 +27,7 @@ import Foundation
     }
 
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? {
-        var params: [String: Any]? = nil
+        var params: [String: Any]?
 
         if let encodableObj = encodableObj {
             do {
@@ -41,5 +41,5 @@ import Foundation
 
         return params
     }
-    
+
 }
diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache
index 595bd9419c2..74ce973b287 100644
--- a/modules/openapi-generator/src/main/resources/swift5/Models.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache
@@ -10,11 +10,11 @@ protocol JSONEncodable {
     func encodeToJSON() -> Any
 }
 
-{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum ErrorResponse : Error {
+{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum ErrorResponse: Error {
     case error(Int, Data?, URLResponse?, Error)
 }
 
-{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum DownloadException : Error {
+{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum DownloadException: Error {
     case responseDataMissing
     case responseFailed
     case requestMissing
@@ -30,7 +30,6 @@ protocol JSONEncodable {
     case generalError(Error)
 }
 
-
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Response<T> {
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let statusCode: Int
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let header: [String: String]
@@ -44,7 +43,7 @@ protocol JSONEncodable {
 
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} convenience init(response: HTTPURLResponse, body: T?) {
         let rawHeader = response.allHeaderFields
-        var header = [String:String]()
+        var header = [String: String]()
         for (key, value) in rawHeader {
             if let key = key.base as? String, let value = value as? String {
                 header[key] = value
diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache
index f8c7072b5a5..4582b4bfd54 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
@@ -44,6 +44,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
     
     required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) {
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 1a1716eb8a3..ddd555e5daa 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ internal struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ internal struct APIHelper {
 
     internal static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ internal struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 5c97a2b5713..fbbcd7deea0 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     internal var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
index 5b09f955711..1f7f2ffbe17 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift
@@ -23,7 +23,7 @@ public struct APIHelper {
     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: ",")
+                result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
             } else if let value: Any = item.value {
                 result[item.key] = "\(value)"
             }
@@ -47,7 +47,7 @@ public struct APIHelper {
 
     public static func mapValueToPathItem(_ source: Any) -> Any {
         if let collection = source as? [Any?] {
-            return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
+            return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
         }
         return source
     }
@@ -55,7 +55,7 @@ public struct APIHelper {
     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?] {
-                collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in
+                collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
                     result.append(URLQueryItem(name: item.key, value: value))
                 }
             } else if let value = item.value {
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 e1bc654b3bc..3a3f7882734 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -44,6 +44,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
      - intercept and handle errors like authorization
      - retry the request.
      */
+    @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
     required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-- 
GitLab


From dd9a19ab8ffb01acabee694b3f142e51ef6813c7 Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Tue, 5 Jan 2021 01:27:14 +0000
Subject: [PATCH 20/28] [Swift 5] fix Multipart FormData encoding and add
 support for Form URLEncoded enconding (#8275)

* [swift5] fix issue with form data with null file

* [swift5] fix issue with form data with null file on alamofire implementation

* [swift5] update sample projects

* [swift5] fix issue with form data with null file on alamofire implementation

* [swift5] add support for form url enconded in URLSession

* [swift5] add support for form url enconded in Alamofire

* [swift] improve code formatting

* [swift] improve code formatting

* [swift] dont defaut to application/json
---
 .../languages/Swift5ClientCodegen.java        |   4 +-
 .../src/main/resources/swift5/APIs.mustache   |   4 +-
 .../src/main/resources/swift5/api.mustache    |  27 ++-
 .../AlamofireImplementations.mustache         | 155 +++++++-----
 .../URLSessionImplementations.mustache        | 226 ++++++++++--------
 .../src/main/resources/swift5/model.mustache  |  24 +-
 .../resources/swift5/modelObject.mustache     |  26 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/AlamofireImplementations.swift   | 112 +++++----
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/alamofireLibrary/docs/FakeAPI.md   |   6 +-
 .../swift5/alamofireLibrary/docs/MapTest.md   |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/alamofireLibrary/docs/StoreAPI.md  |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  36 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/combineLibrary/docs/FakeAPI.md     |   6 +-
 .../swift5/combineLibrary/docs/MapTest.md     |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/combineLibrary/docs/StoreAPI.md    |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../default/docs/AdditionalPropertiesClass.md |   4 +-
 .../petstore/swift5/default/docs/FakeAPI.md   |   6 +-
 .../petstore/swift5/default/docs/MapTest.md   |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../petstore/swift5/default/docs/StoreAPI.md  |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  70 +++++-
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../Classes/OpenAPIs/Models/Pet.swift         |   1 -
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../swift5/deprecated/docs/StoreAPI.md        |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/nonPublicApi/docs/FakeAPI.md       |   6 +-
 .../swift5/nonPublicApi/docs/MapTest.md       |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/nonPublicApi/docs/StoreAPI.md      |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |  10 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 107 +++++++--
 .../APIs/FakeClassnameTags123API.swift        |  10 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  82 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  36 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  68 +++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/objcCompatible/docs/FakeAPI.md     |   6 +-
 .../swift5/objcCompatible/docs/MapTest.md     |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/objcCompatible/docs/StoreAPI.md    |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 115 +++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  88 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  36 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  70 +++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/promisekitLibrary/docs/FakeAPI.md  |   6 +-
 .../swift5/promisekitLibrary/docs/MapTest.md  |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/promisekitLibrary/docs/StoreAPI.md |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/readonlyProperties/docs/FakeAPI.md |   6 +-
 .../swift5/readonlyProperties/docs/MapTest.md |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../readonlyProperties/docs/StoreAPI.md       |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/resultLibrary/docs/FakeAPI.md      |   6 +-
 .../swift5/resultLibrary/docs/MapTest.md      |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/resultLibrary/docs/StoreAPI.md     |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  36 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/rxswiftLibrary/docs/FakeAPI.md     |   6 +-
 .../swift5/rxswiftLibrary/docs/MapTest.md     |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/rxswiftLibrary/docs/StoreAPI.md    |   4 +-
 .../Classes/OpenAPIs/APIs.swift               |   4 +-
 .../OpenAPIs/APIs/AnotherFakeAPI.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/FakeAPI.swift       | 105 ++++++--
 .../APIs/FakeClassnameTags123API.swift        |   8 +-
 .../Classes/OpenAPIs/APIs/PetAPI.swift        |  80 +++++--
 .../Classes/OpenAPIs/APIs/StoreAPI.swift      |  34 ++-
 .../Classes/OpenAPIs/APIs/UserAPI.swift       |  66 ++++-
 .../OpenAPIs/URLSessionImplementations.swift  |  68 ++++--
 .../docs/AdditionalPropertiesClass.md         |   4 +-
 .../swift5/urlsessionLibrary/docs/FakeAPI.md  |   6 +-
 .../swift5/urlsessionLibrary/docs/MapTest.md  |   6 +-
 ...dPropertiesAndAdditionalPropertiesClass.md |   2 +-
 .../swift5/urlsessionLibrary/docs/StoreAPI.md |   4 +-
 144 files changed, 3525 insertions(+), 1222 deletions(-)

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
index 10f44a3f937..bb86edadfef 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
@@ -522,7 +522,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
             return ModelUtils.isSet(p) ? "Set<" + getTypeDeclaration(inner) + ">" : "[" + getTypeDeclaration(inner) + "]";
         } else if (ModelUtils.isMapSchema(p)) {
             Schema inner = getAdditionalProperties(p);
-            return "[String:" + getTypeDeclaration(inner) + "]";
+            return "[String: " + getTypeDeclaration(inner) + "]";
         }
         return super.getTypeDeclaration(p);
     }
@@ -807,7 +807,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
     @Override
     public String toEnumValue(String value, String datatype) {
         // for string, array of string
-        if ("String".equals(datatype) || "[String]".equals(datatype) || "[String:String]".equals(datatype)) {
+        if ("String".equals(datatype) || "[String]".equals(datatype) || "[String: String]".equals(datatype)) {
             return "\"" + String.valueOf(value) + "\"";
         } else {
             return String.valueOf(value);
diff --git a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache
index fd15cf35a7b..d672115546f 100644
--- a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache
@@ -19,7 +19,6 @@ import Foundation
     var credential: URLCredential?
     var headers: [String: String]
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let parameters: [String: Any]?
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let isBody: Bool
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let method: String
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let URLString: String
 
@@ -28,11 +27,10 @@ import Foundation
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.{{/useURLSession}}
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var onProgressReady: ((Progress) -> Void)?
 
-    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders({{projectName}}API.customHeaders)
diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache
index 20a37a94e03..18d3e6b3045 100644
--- a/modules/openapi-generator/src/main/resources/swift5/api.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache
@@ -8,9 +8,8 @@
 import Foundation{{#usePromiseKit}}
 import PromiseKit{{/usePromiseKit}}{{#useRxSwift}}
 import RxSwift{{/useRxSwift}}{{#useCombine}}
-import Combine{{/useCombine}}
+import Combine{{/useCombine}}{{#swiftUseApiNamespace}}
 
-{{#swiftUseApiNamespace}}
 extension {{projectName}}API {
 {{/swiftUseApiNamespace}}
 
@@ -232,9 +231,9 @@ extension {{projectName}}API {
         {{/bodyParam}}
         {{^bodyParam}}
             {{#hasFormParams}}
-        let formParams: [String:Any?] = [
+        let formParams: [String: Any?] = [
                 {{#formParams}}
-            {{> _param}}{{^-last}},{{/-last}}
+            {{> _param}},
                 {{/formParams}}
         ]
 
@@ -242,24 +241,28 @@ extension {{projectName}}API {
         let parameters = APIHelper.convertBoolToString(nonNullParameters)
             {{/hasFormParams}}
             {{^hasFormParams}}
-        let parameters: [String:Any]? = nil
+        let parameters: [String: Any]? = nil
             {{/hasFormParams}}
-        {{/bodyParam}}{{#hasQueryParams}}
+{{/bodyParam}}{{#hasQueryParams}}
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([{{^queryParams}}:{{/queryParams}}
             {{#queryParams}}
-            {{> _param}}{{^-last}}, {{/-last}}
+            {{> _param}},
             {{/queryParams}}
         ]){{/hasQueryParams}}{{^hasQueryParams}}
-        let url = URLComponents(string: URLString){{/hasQueryParams}}{{#headerParams}}{{#-first}}
-        let nillableHeaders: [String: Any?] = [{{/-first}}
-            {{> _param}}{{^-last}},{{/-last}}{{#-last}}
+        let url = URLComponents(string: URLString){{/hasQueryParams}}
+
+        let nillableHeaders: [String: Any?] = [{{^headerParams}}{{^hasFormParams}}
+            :{{/hasFormParams}}{{/headerParams}}{{#hasFormParams}}
+            "Content-Type": {{^consumes}}"multipart/form-data"{{/consumes}}{{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}},{{/hasFormParams}}{{#headerParams}}
+            {{> _param}},{{/headerParams}}
         ]
-        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders){{/-last}}{{/headerParams}}
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}API.requestBuilderFactory.{{#returnType}}getBuilder(){{/returnType}}{{^returnType}}getNonDecodableBuilder(){{/returnType}}
 
-        return requestBuilder.init(method: "{{httpMethod}}", URLString: (url?.string ?? URLString), parameters: parameters, isBody: {{hasBodyParam}}{{#headerParams}}{{#-first}}, headers: headerParameters{{/-first}}{{/headerParams}})
+        return requestBuilder.init(method: "{{httpMethod}}", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 {{/operation}}
diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache
index 410799db9c7..ef593fe7597 100644
--- a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache
@@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory {
         return AlamofireRequestBuilder<T>.self
     }
 
-    func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type {
+    func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type {
         return AlamofireDecodableRequestBuilder<T>.self
     }
 }
@@ -21,8 +21,8 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory {
 private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManager>()
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireRequestBuilder<T>: RequestBuilder<T> {
-    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -39,7 +39,20 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
      May be overridden by a subclass if you want to custom request constructor.
      */
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest() -> URLRequest? {
-        let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
+        guard let xMethod = Alamofire.HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
+
+        let encoding: ParameterEncoding
+
+        switch xMethod {
+        case .get, .head:
+            encoding = URLEncoding()
+
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            encoding = JSONDataEncoding()
+        }
+
         guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil }
         return try? encoding.encode(originalRequest, with: parameters)
     }
@@ -59,62 +72,78 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
      May be overridden by a subclass if you want to control the request
      configuration (e.g. to override the cache policy).
      */
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest {
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest {
         return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers)
     }
 
     override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let managerId:String = UUID().uuidString
+        let managerId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let manager = createSessionManager()
         managerStore[managerId] = manager
 
-        let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
-
-        let xMethod = Alamofire.HTTPMethod(rawValue: method)
-        let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL }
-                                                           .map { $0.0 }
+        guard let xMethod = Alamofire.HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
-        if fileKeys.count > 0 {
-            manager.upload(multipartFormData: { mpForm in
-                for (k, v) in self.parameters! {
-                    switch v {
-                    case let fileURL as URL:
-                        if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) {
-                            mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType)
-                        }
-                        else {
-                            mpForm.append(fileURL, withName: k)
+        let encoding: ParameterEncoding?
+
+        switch xMethod {
+        case .get, .head:
+            encoding = URLEncoding()
+
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = nil
+
+                manager.upload(multipartFormData: { mpForm in
+                    for (k, v) in self.parameters! {
+                        switch v {
+                        case let fileURL as URL:
+                            if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) {
+                                mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType)
+                            } else {
+                                mpForm.append(fileURL, withName: k)
+                            }
+                        case let string as String:
+                            mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
+                        case let number as NSNumber:
+                            mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
+                        default:
+                            fatalError("Unprocessable value \(v) with key \(k)")
                         }
-                    case let string as String:
-                        mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
-                    case let number as NSNumber:
-                        mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
-                    default:
-                        fatalError("Unprocessable value \(v) with key \(k)")
                     }
-                }
-                }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in
-                switch encodingResult {
-                case .success(let upload, _, _):
-                    if let onProgressReady = self.onProgressReady {
-                        onProgressReady(upload.uploadProgress)
-                    }
-                    self.processRequest(request: upload, managerId, apiResponseQueue, completion)
-                case .failure(let encodingError):
-                    apiResponseQueue.async{
-                        completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
+                    }, to: URLString, method: xMethod, headers: nil, encodingCompletion: { encodingResult in
+                    switch encodingResult {
+                    case .success(let upload, _, _):
+                        if let onProgressReady = self.onProgressReady {
+                            onProgressReady(upload.uploadProgress)
+                        }
+                        self.processRequest(request: upload, managerId, apiResponseQueue, completion)
+                    case .failure(let encodingError):
+                        apiResponseQueue.async {
+                            completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
+                        }
                     }
-                }
-            })
-        } else {
-            let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers)
+                })
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = URLEncoding(destination: .httpBody)
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
+        }
+
+        if let encoding = encoding {
+            let request = makeRequest(manager: manager, method: xMethod, encoding: encoding, headers: headers)
             if let onProgressReady = self.onProgressReady {
                 onProgressReady(request.progress)
             }
             processRequest(request: request, managerId, apiResponseQueue, completion)
         }
-
     }
 
     fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -132,14 +161,14 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
         case is String.Type:
             validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in
                 cleanupRequest()
-                
+
                 switch stringResponse.result {
                 case let .success(value):
                     completion(.success(Response(response: stringResponse.response!, body: value as? T)))
                 case let .failure(error):
                     completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error)))
                 }
-                
+
             })
         case is URL.Type:
             validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in
@@ -188,26 +217,26 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
         case is Void.Type:
             validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in
                 cleanupRequest()
-                
+
                 switch voidResponse.result {
                 case .success:
                     completion(.success(Response(response: voidResponse.response!, body: nil)))
                 case let .failure(error):
                     completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error)))
                 }
-                
+
             })
         default:
             validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in
                 cleanupRequest()
-                
+
                 switch dataResponse.result {
                 case .success:
                     completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T)))
                 case let .failure(error):
                     completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error)))
                 }
-                
+
             })
         }
     }
@@ -220,7 +249,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
         return httpHeaders
     }
 
-    fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? {
+    fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? {
 
         guard let contentDisposition = contentDisposition else {
             return nil
@@ -228,7 +257,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
 
         let items = contentDisposition.components(separatedBy: ";")
 
-        var filename : String? = nil
+        var filename: String?
 
         for contentItem in items {
 
@@ -239,7 +268,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
 
             filename = contentItem
             return filename?
-                .replacingCharacters(in: range, with:"")
+                .replacingCharacters(in: range, with: "")
                 .replacingOccurrences(of: "\"", with: "")
                 .trimmingCharacters(in: .whitespacesAndNewlines)
         }
@@ -248,7 +277,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
 
     }
 
-    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
@@ -262,7 +291,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
 
     }
 
-    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
@@ -273,7 +302,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
 
 }
 
-{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilder<T> {
+{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuilder<T> {
 
     override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
         if let credential = self.credential {
@@ -290,7 +319,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
         case is String.Type:
             validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in
                 cleanupRequest()
-                
+
                 switch stringResponse.result {
                 case let .success(value):
                     completion(.success(Response(response: stringResponse.response!, body: value as? T)))
@@ -302,7 +331,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
         case is Void.Type:
             validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in
                 cleanupRequest()
-                
+
                 switch voidResponse.result {
                 case .success:
                     completion(.success(Response(response: voidResponse.response!, body: nil)))
@@ -314,7 +343,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
         case is Data.Type:
             validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in
                 cleanupRequest()
-                
+
                 switch dataResponse.result {
                 case .success:
                     completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T)))
@@ -343,14 +372,14 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
                 }
 
                 let decodeResult = CodableHelper.decode(T.self, from: data)
-                
+
                 switch decodeResult {
                 case let .success(decodableObj):
                     completion(.success(Response(response: httpResponse, body: decodableObj)))
                 case let .failure(error):
                     completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, httpResponse, error)))
                 }
-                
+
             })
         }
     }
@@ -358,9 +387,9 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
 }
 
 extension JSONDataEncoding: ParameterEncoding {
-    
+
     // MARK: Encoding
-    
+
     /// Creates a URL request by encoding parameters and applying them onto an existing request.
     ///
     /// - parameter urlRequest: The request to have parameters applied.
@@ -372,7 +401,7 @@ extension JSONDataEncoding: ParameterEncoding {
     /// - returns: The encoded request.
     public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
         let urlRequest = try urlRequest.asURLRequest()
-        
+
         return self.encode(urlRequest, with: parameters)
     }
 }
diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache
index 4582b4bfd54..594e9c7c1cd 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
@@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory {
         return URLSessionRequestBuilder<T>.self
     }
 
-    func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type {
+    func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type {
         return URLSessionDecodableRequestBuilder<T>.self
     }
 }
@@ -23,16 +23,10 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory {
 private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionRequestBuilder<T>: RequestBuilder<T> {
-    
-    private var observation: NSKeyValueObservation?
-    
-    deinit {
-        observation?.invalidate()
-    }
-    
+
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
-    
+
     /**
      May be assigned if you want to control the authentication challenges.
      */
@@ -46,11 +40,11 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
      */
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
-    
-    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+
+    required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
-    
+
     /**
      May be overridden by a subclass if you want to control the URLSession
      configuration.
@@ -78,71 +72,76 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
      May be overridden by a subclass if you want to control the URLRequest
      configuration (e.g. to override the cache policy).
      */
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest {
-        
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest {
+
         guard let url = URL(string: URLString) else {
             throw DownloadException.requestMissingURL
         }
-        
+
         var originalRequest = URLRequest(url: url)
-        
+
         originalRequest.httpMethod = method.rawValue
-        
+
         headers.forEach { key, value in
             originalRequest.setValue(value, forHTTPHeaderField: key)
         }
-        
+
         buildHeaders().forEach { key, value in
             originalRequest.setValue(value, forHTTPHeaderField: key)
         }
-        
+
         let modifiedRequest = try encoding.encode(originalRequest, with: parameters)
-        
+
         return modifiedRequest
     }
 
     override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId:String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
-        
-        let parameters: [String: Any] = self.parameters ?? [:]
-        
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
-        
-        let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
-            encoding = URLEncoding()
-        }
-        
+
         guard let xMethod = HTTPMethod(rawValue: method) else {
             fatalError("Unsuported Http method - \(method)")
         }
-        
+
+        let encoding: ParameterEncoding
+
+        switch xMethod {
+        case .get, .head:
+            encoding = URLEncoding()
+
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
+        }
+
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
-        
+
         do {
             let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
-            
+
             let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
-                
+
                 guard let self = self else { return }
-                
+
                 if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
-                    
+
                     taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
-                        
+
                         guard let self = self else { return }
-                        
+
                         if shouldRetry {
                             cleanupRequest()
                             self.execute(apiResponseQueue, completion)
@@ -158,22 +157,21 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
                     }
                 }
             }
-            
+
             if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
                 onProgressReady?(dataTask.progress)
             }
-            
+
             dataTask.resume()
-            
+
         } catch {
             apiResponseQueue.async {
                 cleanupRequest()
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
-    
+
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
@@ -193,59 +191,59 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
         switch T.self {
         case is String.Type:
-            
+
             let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? ""
-            
+
             completion(.success(Response<T>(response: httpResponse, body: body as? T)))
-            
+
         case is URL.Type:
             do {
-                
+
                 guard error == nil else {
                     throw DownloadException.responseFailed
                 }
-                
+
                 guard let data = data else {
                     throw DownloadException.responseDataMissing
                 }
-                
+
                 let fileManager = FileManager.default
                 let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0]
                 let requestURL = try self.getURL(from: urlRequest)
-                
+
                 var requestPath = try self.getPath(from: requestURL)
-                
+
                 if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) {
                     requestPath = requestPath.appending("/\(headerFileName)")
                 }
-                
+
                 let filePath = documentsDirectory.appendingPathComponent(requestPath)
                 let directoryPath = filePath.deletingLastPathComponent().path
-                
+
                 try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil)
                 try data.write(to: filePath, options: .atomic)
-                
+
                 completion(.success(Response(response: httpResponse, body: filePath as? T)))
-                
+
             } catch let requestParserError as DownloadException {
                 completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
             } catch let error {
                 completion(.failure(ErrorResponse.error(400, data, response, error)))
             }
-            
+
         case is Void.Type:
-            
+
             completion(.success(Response(response: httpResponse, body: nil)))
-            
+
         default:
-            
+
             completion(.success(Response(response: httpResponse, body: data as? T)))
         }
 
     }
 
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func buildHeaders() -> [String: String] {
-        var httpHeaders: [String : String] = [:]
+        var httpHeaders: [String: String] = [:]
         for (key, value) in self.headers {
             httpHeaders[key] = value
         }
@@ -255,7 +253,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
         return httpHeaders
     }
 
-    fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? {
+    fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? {
 
         guard let contentDisposition = contentDisposition else {
             return nil
@@ -274,7 +272,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
             filename = contentItem
             return filename?
-                .replacingCharacters(in: range, with:"")
+                .replacingCharacters(in: range, with: "")
                 .replacingOccurrences(of: "\"", with: "")
                 .trimmingCharacters(in: .whitespacesAndNewlines)
         }
@@ -283,7 +281,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
     }
 
-    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
@@ -297,7 +295,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
     }
 
-    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
@@ -308,7 +306,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 }
 
-{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionDecodableRequestBuilder<T:Decodable>: URLSessionRequestBuilder<T> {
+{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBuilder<T> {
     override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
 
         if let error = error {
@@ -328,28 +326,28 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
         switch T.self {
         case is String.Type:
-            
+
             let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? ""
-            
+
             completion(.success(Response<T>(response: httpResponse, body: body as? T)))
-            
+
         case is Void.Type:
-            
+
             completion(.success(Response(response: httpResponse, body: nil)))
-            
+
         case is Data.Type:
-            
+
             completion(.success(Response(response: httpResponse, body: data as? T)))
-            
+
         default:
-            
+
             guard let data = data, !data.isEmpty else {
                 completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse)))
                 return
             }
-            
+
             let decodeResult = CodableHelper.decode(T.self, from: data)
-            
+
             switch decodeResult {
             case let .success(decodableObj):
                 completion(.success(Response(response: httpResponse, body: decodableObj)))
@@ -360,10 +358,10 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
     }
 }
 
-fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate {
-    
+private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate {
+
     var credential: URLCredential?
-    
+
     var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))?
 
     func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
@@ -406,13 +404,13 @@ fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataD
     func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest
 }
 
-fileprivate class URLEncoding: ParameterEncoding {
-    func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest {
-        
+private class URLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
         var urlRequest = urlRequest
-        
+
         guard let parameters = parameters else { return urlRequest }
-        
+
         guard let url = urlRequest.url else {
             throw DownloadException.requestMissingURL
         }
@@ -421,12 +419,12 @@ fileprivate class URLEncoding: ParameterEncoding {
             urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters)
             urlRequest.url = urlComponents.url
         }
-        
+
         return urlRequest
     }
 }
 
-fileprivate class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -437,13 +435,13 @@ fileprivate class FileUploadEncoding: ParameterEncoding {
     func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
 
         var urlRequest = urlRequest
-        
+
         guard let parameters = parameters, !parameters.isEmpty else {
             return urlRequest
         }
-        
+
         let boundary = "Boundary-\(UUID().uuidString)"
-                
+
         urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
 
         for (key, value) in parameters {
@@ -483,7 +481,7 @@ fileprivate class FileUploadEncoding: ParameterEncoding {
                 fatalError("Unprocessable value \(value) with key \(key)")
             }
         }
-        
+
         var body = urlRequest.httpBody.orEmpty
 
         body.append("\r\n--\(boundary)--\r\n")
@@ -498,7 +496,7 @@ fileprivate class FileUploadEncoding: ParameterEncoding {
         var urlRequest = urlRequest
 
         var body = urlRequest.httpBody.orEmpty
-        
+
         let fileData = try Data(contentsOf: fileURL)
 
         let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL)
@@ -506,7 +504,7 @@ fileprivate class FileUploadEncoding: ParameterEncoding {
         let fileName = fileURL.lastPathComponent
 
         // If we already added something then we need an additional newline.
-        if (body.count > 0) {
+        if body.count > 0 {
             body.append("\r\n")
         }
 
@@ -522,20 +520,20 @@ fileprivate class FileUploadEncoding: ParameterEncoding {
 
         // The value data.
         body.append(fileData)
-        
+
         urlRequest.httpBody = body
 
         return urlRequest
     }
-    
+
     private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest {
 
         var urlRequest = urlRequest
-        
+
         var body = urlRequest.httpBody.orEmpty
 
         // If we already added something then we need an additional newline.
-        if (body.count > 0) {
+        if body.count > 0 {
             body.append("\r\n")
         }
 
@@ -570,7 +568,25 @@ fileprivate class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/modules/openapi-generator/src/main/resources/swift5/model.mustache b/modules/openapi-generator/src/main/resources/swift5/model.mustache
index 15befbc24b8..a5870644a60 100644
--- a/modules/openapi-generator/src/main/resources/swift5/model.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/model.mustache
@@ -6,22 +6,10 @@
 //
 
 import Foundation
-
 {{#description}}
-/** {{description}} */{{/description}}
-{{#isDeprecated}}
-@available(*, deprecated, message: "This schema is deprecated.")
-{{/isDeprecated}}
-{{#isArray}}
-{{> modelArray}}
-{{/isArray}}
-{{^isArray}}
-{{#isEnum}}
-{{> modelEnum}}
-{{/isEnum}}
-{{^isEnum}}
-{{> modelObject}}
-{{/isEnum}}
-{{/isArray}}
-{{/model}}
-{{/models}}
+
+/** {{description}} */{{/description}}{{#isDeprecated}}
+@available(*, deprecated, message: "This schema is deprecated."){{/isDeprecated}}{{#isArray}}
+{{> modelArray}}{{/isArray}}{{^isArray}}{{#isEnum}}
+{{> modelEnum}}{{/isEnum}}{{^isEnum}}
+{{> modelObject}}{{/isEnum}}{{/isArray}}{{/model}}{{/models}}
diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache
index beb0f0be344..36d1eb6e78b 100644
--- a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache
+++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache
@@ -1,8 +1,5 @@
-{{^objcCompatible}}
-{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
-{{/objcCompatible}}
-{{#objcCompatible}}
-@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
+{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
+{{/objcCompatible}}{{#objcCompatible}}@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
 {{/objcCompatible}}
 
 {{#allVars}}
@@ -13,14 +10,12 @@
 {{#allVars}}
 {{#isEnum}}
     {{#description}}/** {{description}} */
-    {{/description}}{{#deprecated}}
-    @available(*, deprecated, message: "This property is deprecated.")
+    {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.")
     {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}
 {{/isEnum}}
 {{^isEnum}}
     {{#description}}/** {{description}} */
-    {{/description}}{{#deprecated}}
-    @available(*, deprecated, message: "This property is deprecated.")
+    {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.")
     {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{name}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}
     {{#objcCompatible}}
     {{#vendorExtensions.x-swift-optional-scalar}}
@@ -33,8 +28,8 @@
     {{/objcCompatible}}
 {{/isEnum}}
 {{/allVars}}
-
 {{#hasVars}}
+
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}{{^required}} = nil{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) {
         {{#allVars}}
         self.{{name}} = {{name}}
@@ -42,7 +37,7 @@
     }
 {{/hasVars}}
 {{#additionalPropertiesType}}
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var additionalProperties: [String:{{{additionalPropertiesType}}}] = [:]
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var additionalProperties: [String: {{{additionalPropertiesType}}}] = [:]
 
     {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} subscript(key: String) -> {{{additionalPropertiesType}}}? {
         get {
@@ -83,11 +78,12 @@
         {{/allVars}}
         additionalProperties = try container.decodeMap({{{additionalPropertiesType}}}.self, excludedKeys: nonAdditionalPropertyKeys)
     }
-
 {{/additionalPropertiesType}}
 {{^additionalPropertiesType}}{{#vendorExtensions.x-codegen-has-escaped-property-names}}
-    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum CodingKeys: String, CodingKey, CaseIterable { {{#allVars}}
-        case {{name}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}}{{/allVars}}
+    {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum CodingKeys: String, CodingKey, CaseIterable {
+        {{#allVars}}
+        case {{name}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}}
+        {{/allVars}}
     }
 {{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}}
-}
+}
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
index 224d1fc911b..6ee033b07f3 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,18 +18,16 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
     /// Optional block to obtain a reference to the request's progress instance when available.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 5bbf323f820..24b0015a270 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -40,9 +40,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 134d6aea416..58c4b8a093c 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -38,9 +38,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 48cfe7187b9..fb3bb8ce00a 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -43,9 +43,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index c938db72004..5cd3629127b 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index a8a83eda39a..95adcc200ae 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 505ed1b0c5c..cfd30068a9d 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -40,9 +40,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift
index da15e27a474..9685c32b69e 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift
+++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift
@@ -21,8 +21,8 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory {
 private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManager>()
 
 open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
-    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)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -39,7 +39,20 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
      May be overridden by a subclass if you want to custom request constructor.
      */
     open func createURLRequest() -> URLRequest? {
-        let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
+        guard let xMethod = Alamofire.HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
+
+        let encoding: ParameterEncoding
+
+        switch xMethod {
+        case .get, .head:
+            encoding = URLEncoding()
+
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            encoding = JSONDataEncoding()
+        }
+
         guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil }
         return try? encoding.encode(originalRequest, with: parameters)
     }
@@ -64,56 +77,73 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let managerId: String = UUID().uuidString
+        let managerId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let manager = createSessionManager()
         managerStore[managerId] = manager
 
-        let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
-
-        let xMethod = Alamofire.HTTPMethod(rawValue: method)
-        let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL }
-                                                           .map { $0.0 }
-
-        if fileKeys.count > 0 {
-            manager.upload(multipartFormData: { mpForm in
-                for (k, v) in self.parameters! {
-                    switch v {
-                    case let fileURL as URL:
-                        if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) {
-                            mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType)
-                        } else {
-                            mpForm.append(fileURL, withName: k)
+        guard let xMethod = Alamofire.HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
+
+        let encoding: ParameterEncoding?
+
+        switch xMethod {
+        case .get, .head:
+            encoding = URLEncoding()
+
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = nil
+
+                manager.upload(multipartFormData: { mpForm in
+                    for (k, v) in self.parameters! {
+                        switch v {
+                        case let fileURL as URL:
+                            if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) {
+                                mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType)
+                            } else {
+                                mpForm.append(fileURL, withName: k)
+                            }
+                        case let string as String:
+                            mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
+                        case let number as NSNumber:
+                            mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
+                        default:
+                            fatalError("Unprocessable value \(v) with key \(k)")
                         }
-                    case let string as String:
-                        mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
-                    case let number as NSNumber:
-                        mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
-                    default:
-                        fatalError("Unprocessable value \(v) with key \(k)")
-                    }
-                }
-                }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in
-                switch encodingResult {
-                case .success(let upload, _, _):
-                    if let onProgressReady = self.onProgressReady {
-                        onProgressReady(upload.uploadProgress)
                     }
-                    self.processRequest(request: upload, managerId, apiResponseQueue, completion)
-                case .failure(let encodingError):
-                    apiResponseQueue.async {
-                        completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
+                    }, to: URLString, method: xMethod, headers: nil, encodingCompletion: { encodingResult in
+                    switch encodingResult {
+                    case .success(let upload, _, _):
+                        if let onProgressReady = self.onProgressReady {
+                            onProgressReady(upload.uploadProgress)
+                        }
+                        self.processRequest(request: upload, managerId, apiResponseQueue, completion)
+                    case .failure(let encodingError):
+                        apiResponseQueue.async {
+                            completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
+                        }
                     }
-                }
-            })
-        } else {
-            let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers)
+                })
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = URLEncoding(destination: .httpBody)
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
+        }
+
+        if let encoding = encoding {
+            let request = makeRequest(manager: manager, method: xMethod, encoding: encoding, headers: headers)
             if let onProgressReady = self.onProgressReady {
                 onProgressReady(request.progress)
             }
             processRequest(request: request, managerId, apiResponseQueue, completion)
         }
-
     }
 
     fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md
index d0ab705d4e4..83d9a2873c5 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md b/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md
+++ b/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md
index 36365ca5199..383dda5d3c7 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 65a513f941e..f846096ae63 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -44,9 +44,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 03f9b6cbde6..34fa51403b6 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -42,9 +42,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -80,9 +86,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -118,9 +130,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -156,9 +174,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -194,9 +218,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -233,12 +263,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -276,9 +312,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -355,7 +397,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -363,9 +405,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -482,7 +530,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -493,17 +541,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -554,17 +605,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -601,9 +654,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -640,7 +699,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -648,9 +707,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 1b47d1a5dbc..f6b896887ef 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -47,9 +47,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 8e41c18d161..01b5812ecf3 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -46,9 +46,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -92,14 +98,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -149,12 +157,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -197,12 +211,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -246,9 +266,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -288,9 +314,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -335,7 +367,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -343,9 +375,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -390,7 +428,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -398,9 +436,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -445,7 +489,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -453,9 +497,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 259a7cf6ada..c3499823631 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -47,16 +47,22 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
      Returns pet inventories by status
      
      - parameter apiResponseQueue: The queue on which api response is dispatched.
-     - returns: AnyPublisher<[String:Int], Error>
+     - returns: AnyPublisher<[String: Int], Error>
      */
     @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
     open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[String: Int], Error> {
@@ -79,7 +85,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -88,9 +94,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -131,9 +143,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -170,9 +188,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 747e2f31fb9..9df08496cc2 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -44,9 +44,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -83,9 +89,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -122,9 +134,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -165,9 +183,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -207,9 +231,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -250,12 +280,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -290,9 +326,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -335,9 +377,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md
index d0ab705d4e4..83d9a2873c5 100644
--- a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md b/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md
+++ b/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md
index 36365ca5199..383dda5d3c7 100644
--- a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 5bbf323f820..24b0015a270 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -40,9 +40,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 134d6aea416..58c4b8a093c 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -38,9 +38,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 48cfe7187b9..fb3bb8ce00a 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -43,9 +43,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index c938db72004..5cd3629127b 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index a8a83eda39a..95adcc200ae 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 505ed1b0c5c..cfd30068a9d 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -40,9 +40,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md
index d0ab705d4e4..83d9a2873c5 100644
--- a/samples/client/petstore/swift5/default/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/default/docs/MapTest.md b/samples/client/petstore/swift5/default/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/default/docs/MapTest.md
+++ b/samples/client/petstore/swift5/default/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/default/docs/StoreAPI.md b/samples/client/petstore/swift5/default/docs/StoreAPI.md
index 36365ca5199..383dda5d3c7 100644
--- a/samples/client/petstore/swift5/default/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/default/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift
index 74babd69f97..71c2a2fa5b7 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 06a266aab47..f46c7ac57ea 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index ff110015954..c34e8332551 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 04a9b99643c..255ffb0cb55 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -43,9 +43,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -82,9 +88,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -164,9 +182,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -203,9 +227,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -243,12 +273,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -283,9 +319,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -328,9 +370,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index cb69946cd9f..2980550e3cb 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -18,7 +18,6 @@ public struct Pet: Codable {
     public var id: Int64?
     public var category: Category?
     public var name: String?
-
     @available(*, deprecated, message: "This property is deprecated.")
     public var photoUrls: [String]
     public var tags: [Tag]?
diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md b/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md
index 4c04b6e431f..f28f141f638 100644
--- a/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift
index 5dfbd9cea8d..f5569a9fdf3 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ internal class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     internal let parameters: [String: Any]?
-    internal let isBody: Bool
     internal let method: String
     internal let URLString: String
 
@@ -27,11 +26,10 @@ internal class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     internal var onProgressReady: ((Progress) -> Void)?
 
-    required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required internal init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 174e6c12aed..537dacc4c1a 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -40,9 +40,15 @@ internal class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index ab1b8f09247..03fd8a8ca15 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -38,9 +38,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ internal class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ internal class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ internal class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ internal class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ internal class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ internal class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ internal class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 548c5fb3523..76f1b99ed1c 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -43,9 +43,15 @@ internal class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index cb54fce0dcb..658ef61ddc0 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ internal class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ internal class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ internal class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ internal class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ internal class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ internal class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ internal class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ internal class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ internal class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ internal class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ internal class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ internal class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index f1e423111d0..3f0f902ccd8 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ internal class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ internal class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     internal class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ internal class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ internal class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ internal class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index c8d714e8991..f4a787ff486 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -40,9 +40,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ internal class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ internal class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 fbbcd7deea0..11378e5653f 100644
--- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     internal var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required internal init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md
index dd2d871bca8..b7dbe0b2260 100644
--- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    internal class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    internal class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md b/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md
+++ b/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md
index cec8acecb81..02968503f82 100644
--- a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    internal class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    internal class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 2e9ad96a66b..e1c068f2627 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc open class AnotherFakeAPI: NSObject {
+@objc open class AnotherFakeAPI : NSObject {
     /**
      To test special tags
      
@@ -40,9 +40,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 6483ab29bcc..0af3b8d55a8 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc open class FakeAPI: NSObject {
+@objc open class FakeAPI : NSObject {
     /**
 
      - parameter body: (body) Input boolean as post body (optional)
@@ -38,9 +38,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ import Foundation
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ import Foundation
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ import Foundation
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ import Foundation
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ import Foundation
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ import Foundation
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index b9cfc75eeb4..7115a294b03 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc open class FakeClassnameTags123API: NSObject {
+@objc open class FakeClassnameTags123API : NSObject {
     /**
      To test class name in snake case
      
@@ -43,9 +43,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index d022b687736..7dc0f6ecde4 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc open class PetAPI: NSObject {
+@objc open class PetAPI : NSObject {
     /**
      Add a new pet to the store
      
@@ -42,9 +42,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ import Foundation
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ import Foundation
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ import Foundation
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ import Foundation
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ import Foundation
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ import Foundation
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index a19d12c7d24..2abb82081dd 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc open class StoreAPI: NSObject {
+@objc open class StoreAPI : NSObject {
     /**
      Delete purchase order by ID
      
@@ -43,9 +43,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ import Foundation
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 4dfe4da1a02..1b384965e07 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -7,7 +7,7 @@
 
 import Foundation
 
-@objc open class UserAPI: NSObject {
+@objc open class UserAPI : NSObject {
     /**
      Create user
      
@@ -40,9 +40,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ import Foundation
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ import Foundation
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md
index f7faf3aa2aa..a5a97eb2aeb 100644
--- a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md b/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md
+++ b/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md
index ba59be9d543..4add349c9c1 100644
--- a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index c3a97ff074c..84159541989 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -43,9 +43,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 80153ba634d..b87b809198b 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -41,9 +41,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -78,9 +84,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -115,9 +127,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -189,9 +213,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -201,7 +231,7 @@ open class FakeAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func testBodyWithQueryParams( query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func testBodyWithQueryParams( query: String,  body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -227,12 +257,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +305,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -294,7 +336,7 @@ open class FakeAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func testEndpointParameters( number: Double,  double: Double,  patternWithoutDelimiter: String,  byte: Data,  integer: Int? = nil,  int32: Int? = nil,  int64: Int64? = nil,  float: Float? = nil,  string: String? = nil,  binary: URL? = nil,  date: Date? = nil,  dateTime: Date? = nil,  password: String? = nil,  callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -347,7 +389,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -355,9 +397,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -441,7 +489,7 @@ open class FakeAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func testEnumParameters( enumHeaderStringArray: [String]? = nil,  enumHeaderString: EnumHeaderString_testEnumParameters? = nil,  enumQueryStringArray: [String]? = nil,  enumQueryString: EnumQueryString_testEnumParameters? = nil,  enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil,  enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil,  enumFormStringArray: [String]? = nil,  enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -473,7 +521,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -484,17 +532,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -509,7 +560,7 @@ open class FakeAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func testGroupParameters( requiredStringGroup: Int,  requiredBooleanGroup: Bool,  requiredInt64Group: Int64,  stringGroup: Int? = nil,  booleanGroup: Bool? = nil,  int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -544,17 +595,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -590,9 +643,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ open class FakeAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func testJsonFormData( param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func testJsonFormData( param: String,  param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -628,7 +687,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -636,9 +695,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 3a05f8eaf60..6066f4ec831 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -46,9 +46,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 18d3fd1d094..e60028960c8 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -45,9 +45,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -58,7 +64,7 @@ open class PetAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func deletePet( petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func deletePet( petId: Int64,  apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -90,14 +96,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -146,12 +154,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -193,12 +207,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -241,9 +261,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -282,9 +308,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -296,7 +328,7 @@ open class PetAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func updatePetWithForm( petId: Int64,  name: String? = nil,  status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -328,7 +360,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -336,9 +368,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -350,7 +388,7 @@ open class PetAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<ApiResponse>
      */
-    open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
+    open class func uploadFile( petId: Int64,  additionalMetadata: String? = nil,  file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
         let deferred = Promise<ApiResponse>.pending()
         uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -382,7 +420,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -390,9 +428,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -404,7 +448,7 @@ open class PetAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<ApiResponse>
      */
-    open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
+    open class func uploadFileWithRequiredFile( petId: Int64,  requiredFile: URL,  additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
         let deferred = Promise<ApiResponse>.pending()
         uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -436,7 +480,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -444,9 +488,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 20fc8a1468c..a76e39ab8f0 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -46,16 +46,22 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
      Returns pet inventories by status
      
      - parameter apiResponseQueue: The queue on which api response is dispatched.
-     - returns: Promise<[String:Int]>
+     - returns: Promise<[String: Int]>
      */
     open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[String: Int]> {
         let deferred = Promise<[String: Int]>.pending()
@@ -77,7 +83,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -86,9 +92,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -128,9 +140,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -166,9 +184,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 89c48c3b28f..b451a340454 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -43,9 +43,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -81,9 +87,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -119,9 +131,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -161,9 +179,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -202,9 +226,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -215,7 +245,7 @@ open class UserAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<String>
      */
-    open class func loginUser( username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<String> {
+    open class func loginUser( username: String,  password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<String> {
         let deferred = Promise<String>.pending()
         loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -244,12 +274,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -283,9 +319,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -296,7 +338,7 @@ open class UserAPI {
      - parameter apiResponseQueue: The queue on which api response is dispatched.
      - returns: Promise<Void>
      */
-    open class func updateUser( username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
+    open class func updateUser( username: String,  body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
         let deferred = Promise<Void>.pending()
         updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in
             switch result {
@@ -327,9 +369,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md
index 5519037c52c..72d6935fb92 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md
@@ -534,7 +534,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties( param: [String:String]) -> Promise<Void>
+    open class func testInlineAdditionalProperties( param: [String: String]) -> Promise<Void>
 ```
 
 test inline additionalProperties
@@ -544,7 +544,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param).then {
@@ -560,7 +560,7 @@ FakeAPI.testInlineAdditionalProperties(param: param).then {
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md b/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md
+++ b/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md
index 085d479bce2..e33defdf28d 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md
@@ -59,7 +59,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory() -> Promise<[String:Int]>
+    open class func getInventory() -> Promise<[String: Int]>
 ```
 
 Returns pet inventories by status
@@ -87,7 +87,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 5bbf323f820..24b0015a270 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -40,9 +40,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 134d6aea416..58c4b8a093c 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -38,9 +38,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 48cfe7187b9..fb3bb8ce00a 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -43,9 +43,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index c938db72004..5cd3629127b 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index a8a83eda39a..95adcc200ae 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 505ed1b0c5c..cfd30068a9d 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -40,9 +40,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
index 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/readonlyProperties/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/readonlyProperties/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/readonlyProperties/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md
index d0ab705d4e4..83d9a2873c5 100644
--- a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/MapTest.md b/samples/client/petstore/swift5/readonlyProperties/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/readonlyProperties/docs/MapTest.md
+++ b/samples/client/petstore/swift5/readonlyProperties/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/readonlyProperties/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/readonlyProperties/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/readonlyProperties/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md
index 36365ca5199..383dda5d3c7 100644
--- a/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 001f7160811..1c777abff63 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -40,9 +40,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 1289d6e2a94..642370b2bc1 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -38,9 +38,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index f54d6e7fcf0..4cf17d8a884 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -43,9 +43,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 92893a31295..fd4c8fb152a 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 5024c9dc8f6..a50d54cada1 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index c96c572b50c..58b6b51d8b0 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -40,9 +40,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md
index d0ab705d4e4..83d9a2873c5 100644
--- a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md b/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md
+++ b/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md
index 36365ca5199..383dda5d3c7 100644
--- a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 792371b3842..1affe07267f 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -45,9 +45,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 3e9b32438c8..f76577526ec 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -43,9 +43,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -82,9 +88,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -160,9 +178,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -199,9 +223,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -239,12 +269,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -283,9 +319,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -363,7 +405,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -371,9 +413,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -491,7 +539,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -502,17 +550,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -564,17 +615,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -612,9 +665,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -652,7 +711,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -660,9 +719,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 989a914f379..ec0775dbde0 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -48,9 +48,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index b3a26902360..e1152e64add 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -47,9 +47,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -94,14 +100,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,12 +160,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -201,12 +215,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -251,9 +271,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -294,9 +320,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -342,7 +374,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -350,9 +382,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -398,7 +436,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -406,9 +444,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +498,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -462,9 +506,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index dea3933433c..4dac29ad2be 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -48,16 +48,22 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
      Returns pet inventories by status
      
      - parameter apiResponseQueue: The queue on which api response is dispatched.
-     - returns: Observable<[String:Int]>
+     - returns: Observable<[String: Int]>
      */
     open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[String: Int]> {
         return Observable.create { observer -> Disposable in
@@ -81,7 +87,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -90,9 +96,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -134,9 +146,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -174,9 +192,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 3447ea28c0e..5bfcc43e2a2 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -45,9 +45,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,9 +91,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -125,9 +137,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -169,9 +187,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -212,9 +236,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -256,12 +286,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -297,9 +333,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -343,9 +385,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md
index aae8b34423b..0f616c1db2d 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md
@@ -470,7 +470,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String]) -> Observable<Void>
+    open class func testInlineAdditionalProperties(param: [String: String]) -> Observable<Void>
 ```
 
 test inline additionalProperties
@@ -480,7 +480,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new
 ```
@@ -489,7 +489,7 @@ let param = "TODO" // [String:String] | request body
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md
+++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md
index a648ce8859b..456d08d952a 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md
@@ -52,7 +52,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory() -> Observable<[String:Int]>
+    open class func getInventory() -> Observable<[String: Int]>
 ```
 
 Returns pet inventories by status
@@ -73,7 +73,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
index a5c2d605dff..3183a307a7b 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift
@@ -18,7 +18,6 @@ open class RequestBuilder<T> {
     var credential: URLCredential?
     var headers: [String: String]
     public let parameters: [String: Any]?
-    public let isBody: Bool
     public let method: String
     public let URLString: String
 
@@ -27,11 +26,10 @@ open class RequestBuilder<T> {
     /// If you need to get the request's progress in older OS versions, please use Alamofire http client.
     public var onProgressReady: ((Progress) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
         self.method = method
         self.URLString = URLString
         self.parameters = parameters
-        self.isBody = isBody
         self.headers = headers
 
         addHeaders(PetstoreClientAPI.customHeaders)
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 5bbf323f820..24b0015a270 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -40,9 +40,15 @@ open class AnotherFakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 134d6aea416..58c4b8a093c 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -38,9 +38,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Bool>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -73,9 +79,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -108,9 +120,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Double>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -143,9 +161,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -178,9 +202,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -214,12 +244,18 @@ open class FakeAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "query": query.encodeToJSON()
+            "query": query.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -254,9 +290,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -330,7 +372,7 @@ open class FakeAPI {
             "date": date?.encodeToJSON(),
             "dateTime": dateTime?.encodeToJSON(),
             "password": password?.encodeToJSON(),
-            "callback": callback?.encodeToJSON()
+            "callback": callback?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -338,9 +380,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -454,7 +502,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "enum_form_string_array": enumFormStringArray?.encodeToJSON(),
-            "enum_form_string": enumFormString?.encodeToJSON()
+            "enum_form_string": enumFormString?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -465,17 +513,20 @@ open class FakeAPI {
             "enum_query_string_array": enumQueryStringArray?.encodeToJSON(),
             "enum_query_string": enumQueryString?.encodeToJSON(),
             "enum_query_integer": enumQueryInteger?.encodeToJSON(),
-            "enum_query_double": enumQueryDouble?.encodeToJSON()
+            "enum_query_double": enumQueryDouble?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
             "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(),
-            "enum_header_string": enumHeaderString?.encodeToJSON()
+            "enum_header_string": enumHeaderString?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -523,17 +574,19 @@ open class FakeAPI {
             "required_string_group": requiredStringGroup.encodeToJSON(),
             "required_int64_group": requiredInt64Group.encodeToJSON(),
             "string_group": stringGroup?.encodeToJSON(),
-            "int64_group": int64Group?.encodeToJSON()
+            "int64_group": int64Group?.encodeToJSON(),
         ])
+
         let nillableHeaders: [String: Any?] = [
             "required_boolean_group": requiredBooleanGroup.encodeToJSON(),
-            "boolean_group": booleanGroup?.encodeToJSON()
+            "boolean_group": booleanGroup?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -567,9 +620,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -603,7 +662,7 @@ open class FakeAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "param": param.encodeToJSON(),
-            "param2": param2.encodeToJSON()
+            "param2": param2.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -611,9 +670,15 @@ open class FakeAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 48cfe7187b9..fb3bb8ce00a 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -43,9 +43,15 @@ open class FakeClassnameTags123API {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index c938db72004..5cd3629127b 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -42,9 +42,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -85,14 +91,16 @@ open class PetAPI {
         let parameters: [String: Any]? = nil
 
         let url = URLComponents(string: URLString)
+
         let nillableHeaders: [String: Any?] = [
-            "api_key": apiKey?.encodeToJSON()
+            "api_key": apiKey?.encodeToJSON(),
         ]
+
         let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
 
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -139,12 +147,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "status": status.encodeToJSON()
+            "status": status.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -184,12 +198,18 @@ open class PetAPI {
 
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
-            "tags": tags.encodeToJSON()
+            "tags": tags.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -230,9 +250,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -269,9 +295,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -313,7 +345,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "name": name?.encodeToJSON(),
-            "status": status?.encodeToJSON()
+            "status": status?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -321,9 +353,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "application/x-www-form-urlencoded",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -365,7 +403,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "file": file?.encodeToJSON()
+            "file": file?.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -373,9 +411,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -417,7 +461,7 @@ open class PetAPI {
         let URLString = PetstoreClientAPI.basePath + path
         let formParams: [String: Any?] = [
             "additionalMetadata": additionalMetadata?.encodeToJSON(),
-            "requiredFile": requiredFile.encodeToJSON()
+            "requiredFile": requiredFile.encodeToJSON(),
         ]
 
         let nonNullParameters = APIHelper.rejectNil(formParams)
@@ -425,9 +469,15 @@ open class PetAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            "Content-Type": "multipart/form-data",
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index a8a83eda39a..95adcc200ae 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -43,9 +43,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -72,7 +78,7 @@ open class StoreAPI {
      - API Key:
        - type: apiKey api_key 
        - name: api_key
-     - returns: RequestBuilder<[String:Int]> 
+     - returns: RequestBuilder<[String: Int]> 
      */
     open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
         let path = "/store/inventory"
@@ -81,9 +87,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -121,9 +133,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -157,9 +175,15 @@ open class StoreAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 505ed1b0c5c..cfd30068a9d 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -40,9 +40,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -76,9 +82,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -112,9 +124,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -152,9 +170,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -191,9 +215,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -231,12 +261,18 @@ open class UserAPI {
         var url = URLComponents(string: URLString)
         url?.queryItems = APIHelper.mapValuesToQueryItems([
             "username": username.encodeToJSON(),
-            "password": password.encodeToJSON()
+            "password": password.encodeToJSON(),
         ])
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -268,9 +304,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
+        return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
     /**
@@ -310,9 +352,15 @@ open class UserAPI {
 
         let url = URLComponents(string: URLString)
 
+        let nillableHeaders: [String: Any?] = [
+            :
+        ]
+
+        let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
+
         let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
 
-        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
+        return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, headers: headerParameters)
     }
 
 }
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 3a3f7882734..28bc756aa58 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
+++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift
@@ -24,12 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
 
 open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
 
-    private var observation: NSKeyValueObservation?
-
-    deinit {
-        observation?.invalidate()
-    }
-
     // swiftlint:disable:next weak_delegate
     fileprivate let sessionDelegate = SessionDelegate()
 
@@ -47,8 +41,8 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     @available(*, deprecated, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client")
     public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)?
 
-    required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
-        super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
+    required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) {
+        super.init(method: method, URLString: URLString, parameters: parameters, headers: headers)
     }
 
     /**
@@ -102,32 +96,37 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
     }
 
     override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
-        let urlSessionId: String = UUID().uuidString
+        let urlSessionId = UUID().uuidString
         // Create a new manager for each request to customize its request header
         let urlSession = createURLSession()
         urlSessionStore[urlSessionId] = urlSession
 
-        let parameters: [String: Any] = self.parameters ?? [:]
-
-        let fileKeys = parameters.filter { $1 is URL }
-            .map { $0.0 }
+        guard let xMethod = HTTPMethod(rawValue: method) else {
+            fatalError("Unsuported Http method - \(method)")
+        }
 
         let encoding: ParameterEncoding
-        if fileKeys.count > 0 {
-            encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
-        } else if isBody {
-            encoding = JSONDataEncoding()
-        } else {
+
+        switch xMethod {
+        case .get, .head:
             encoding = URLEncoding()
-        }
 
-        guard let xMethod = HTTPMethod(rawValue: method) else {
-            fatalError("Unsuported Http method - \(method)")
+        case .options, .post, .put, .patch, .delete, .trace, .connect:
+            let contentType = headers["Content-Type"] ?? "application/json"
+
+            if contentType == "application/json" {
+                encoding = JSONDataEncoding()
+            } else if contentType == "multipart/form-data" {
+                encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:))
+            } else if contentType == "application/x-www-form-urlencoded" {
+                encoding = FormURLEncoding()
+            } else {
+                fatalError("Unsuported Media Type - \(contentType)")
+            }
         }
 
         let cleanupRequest = {
             urlSessionStore[urlSessionId] = nil
-            self.observation?.invalidate()
         }
 
         do {
@@ -171,7 +170,6 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
                 completion(.failure(ErrorResponse.error(415, nil, nil, error)))
             }
         }
-
     }
 
     fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
@@ -426,7 +424,7 @@ private class URLEncoding: ParameterEncoding {
     }
 }
 
-private class FileUploadEncoding: ParameterEncoding {
+private class FormDataEncoding: ParameterEncoding {
 
     let contentTypeForFormPart: (_ fileURL: URL) -> String?
 
@@ -570,7 +568,25 @@ private class FileUploadEncoding: ParameterEncoding {
 
 }
 
-fileprivate extension Data {
+private class FormURLEncoding: ParameterEncoding {
+    func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest {
+
+        var urlRequest = urlRequest
+
+        var requestBodyComponents = URLComponents()
+        requestBodyComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters ?? [:])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = requestBodyComponents.query?.data(using: .utf8)
+
+        return urlRequest
+    }
+}
+
+private extension Data {
     /// Append string to Data
     ///
     /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to Data, and then add that data to the Data, this wraps it in a nice convenient little extension to Data. This converts using UTF-8.
@@ -584,7 +600,7 @@ fileprivate extension Data {
     }
 }
 
-fileprivate extension Optional where Wrapped == Data {
+private extension Optional where Wrapped == Data {
     var orEmpty: Data {
         self ?? Data()
     }
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md
index e22d28be1de..1f222244134 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapString** | **[String:String]** |  | [optional] 
-**mapMapString** | [String:[String:String]] |  | [optional] 
+**mapString** | **[String: String]** |  | [optional] 
+**mapMapString** | [String: [String: String]] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md
index d0ab705d4e4..83d9a2873c5 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md
+++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md
@@ -564,7 +564,7 @@ No authorization required
 
 # **testInlineAdditionalProperties**
 ```swift
-    open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
+    open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
 ```
 
 test inline additionalProperties
@@ -574,7 +574,7 @@ test inline additionalProperties
 // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
 import PetstoreClient
 
-let param = "TODO" // [String:String] | request body
+let param = "TODO" // [String: String] | request body
 
 // test inline additionalProperties
 FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
@@ -593,7 +593,7 @@ FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **param** | [**[String:String]**](String.md) | request body | 
+ **param** | [**[String: String]**](String.md) | request body | 
 
 ### Return type
 
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md
index 56213c4113f..73f9e0d50ac 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md
+++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**mapMapOfString** | [String:[String:String]] |  | [optional] 
-**mapOfEnumString** | **[String:String]** |  | [optional] 
-**directMap** | **[String:Bool]** |  | [optional] 
+**mapMapOfString** | [String: [String: String]] |  | [optional] 
+**mapOfEnumString** | **[String: String]** |  | [optional] 
+**directMap** | **[String: Bool]** |  | [optional] 
 **indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index fcffb8ecdbf..3fdfd03f0e3 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **uuid** | **UUID** |  | [optional] 
 **dateTime** | **Date** |  | [optional] 
-**map** | [String:Animal] |  | [optional] 
+**map** | [String: Animal] |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md
index 36365ca5199..383dda5d3c7 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md
+++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md
@@ -62,7 +62,7 @@ No authorization required
 
 # **getInventory**
 ```swift
-    open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void)
+    open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void)
 ```
 
 Returns pet inventories by status
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
 
 ### Return type
 
-**[String:Int]**
+**[String: Int]**
 
 ### Authorization
 
-- 
GitLab


From 604ac6d90ffdfd9694efb2be4289701fcaa7bb3d Mon Sep 17 00:00:00 2001
From: Josh Burton <josh@arklabs.nz>
Date: Tue, 5 Jan 2021 14:40:32 +1300
Subject: [PATCH 21/28] =?UTF-8?q?[dart-dio]=20Serializes=20request=20bodie?=
 =?UTF-8?q?s=20using=20a=20specific=20serializer=20so=20a=E2=80=A6=20(#638?=
 =?UTF-8?q?4)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Updates samples

* Handles primitive types
---
 .../src/main/resources/dart-dio/api.mustache  | 16 +++++++++----
 .../petstore_client_lib/lib/api/pet_api.dart  |  6 +++--
 .../lib/api/store_api.dart                    |  3 ++-
 .../petstore_client_lib/lib/api/user_api.dart |  6 +++--
 .../petstore_client_lib/lib/api/pet_api.dart  |  6 +++--
 .../lib/api/store_api.dart                    |  3 ++-
 .../petstore_client_lib/lib/api/user_api.dart |  6 +++--
 .../lib/api/another_fake_api.dart             |  3 ++-
 .../lib/api/fake_api.dart                     | 24 ++++++++++++-------
 .../lib/api/fake_classname_tags123_api.dart   |  3 ++-
 .../lib/api/pet_api.dart                      |  6 +++--
 .../lib/api/store_api.dart                    |  3 ++-
 .../lib/api/user_api.dart                     |  6 +++--
 13 files changed, 60 insertions(+), 31 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache
index a7f830a5135..82b6057a683 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache
@@ -76,13 +76,19 @@ class {{classname}} {
         {{/hasFormParams}}
         {{#bodyParam}}
 
-            {{#isArray}}
+        {{#isArray}}
         const type = FullType(BuiltList, [FullType({{baseType}})]);
         final serializedBody = _serializers.serialize({{paramName}}, specifiedType: type);
-            {{/isArray}}
-            {{^isArray}}
-        final serializedBody = _serializers.serialize({{paramName}});
-            {{/isArray}}
+        {{/isArray}}
+        {{^isArray}}
+        {{#isPrimitiveType}}
+        var serializedBody = {{paramName}};
+        {{/isPrimitiveType}}
+        {{^isPrimitiveType}}
+        final bodySerializer = _serializers.serializerForType({{baseType}});
+        final serializedBody = _serializers.serializeWith(bodySerializer, {{paramName}});
+        {{/isPrimitiveType}}
+        {{/isArray}}
         final json{{paramName}} = json.encode(serializedBody);
         bodyData = json{{paramName}};
         {{/bodyParam}}
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
index c975d10e631..4e37f1e056a 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
@@ -43,7 +43,8 @@ class PetApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(body);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
@@ -347,7 +348,8 @@ class PetApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(body);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
index eb62c2dc17f..260956e4215 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
@@ -205,7 +205,8 @@ class StoreApi {
 
         final List<String> contentTypes = [];
 
-        final serializedBody = _serializers.serialize(body);
+        final bodySerializer = _serializers.serializerForType(Order);
+        final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
index 9183e1f5a76..64d59772609 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
@@ -37,7 +37,8 @@ class UserApi {
 
         final List<String> contentTypes = [];
 
-        final serializedBody = _serializers.serialize(body);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
@@ -394,7 +395,8 @@ class UserApi {
 
         final List<String> contentTypes = [];
 
-        final serializedBody = _serializers.serialize(body);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
index 29837e6354b..646a68b206e 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
@@ -43,7 +43,8 @@ class PetApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(pet);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, pet);
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
@@ -360,7 +361,8 @@ class PetApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(pet);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, pet);
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
index cc30e5b5597..e7f61eb6409 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
@@ -207,7 +207,8 @@ class StoreApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(order);
+        final bodySerializer = _serializers.serializerForType(Order);
+        final serializedBody = _serializers.serializeWith(bodySerializer, order);
         final jsonorder = json.encode(serializedBody);
         bodyData = jsonorder;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
index c7ba72a9a88..b3291c98cda 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
@@ -39,7 +39,8 @@ class UserApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(user);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, user);
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
@@ -437,7 +438,8 @@ class UserApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(user);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, user);
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart
index bb7458c32f1..b0a1bb7491b 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart
@@ -38,7 +38,8 @@ class AnotherFakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(modelClient);
+        final bodySerializer = _serializers.serializerForType(ModelClient);
+        final serializedBody = _serializers.serializeWith(bodySerializer, modelClient);
         final jsonmodelClient = json.encode(serializedBody);
         bodyData = jsonmodelClient;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart
index 4347da0f254..4e054b7de8a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart
@@ -108,7 +108,8 @@ class FakeApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(pet);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, pet);
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
@@ -164,7 +165,7 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(body);
+        var serializedBody = body;
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
@@ -227,7 +228,8 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(outerComposite);
+        final bodySerializer = _serializers.serializerForType(OuterComposite);
+        final serializedBody = _serializers.serializeWith(bodySerializer, outerComposite);
         final jsonouterComposite = json.encode(serializedBody);
         bodyData = jsonouterComposite;
 
@@ -291,7 +293,7 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(body);
+        var serializedBody = body;
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
@@ -354,7 +356,7 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(body);
+        var serializedBody = body;
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
@@ -417,7 +419,8 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(fileSchemaTestClass);
+        final bodySerializer = _serializers.serializerForType(FileSchemaTestClass);
+        final serializedBody = _serializers.serializeWith(bodySerializer, fileSchemaTestClass);
         final jsonfileSchemaTestClass = json.encode(serializedBody);
         bodyData = jsonfileSchemaTestClass;
 
@@ -470,7 +473,8 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(user);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, user);
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
@@ -521,7 +525,8 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(modelClient);
+        final bodySerializer = _serializers.serializerForType(ModelClient);
+        final serializedBody = _serializers.serializeWith(bodySerializer, modelClient);
         final jsonmodelClient = json.encode(serializedBody);
         bodyData = jsonmodelClient;
 
@@ -793,7 +798,8 @@ class FakeApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(requestBody);
+        final bodySerializer = _serializers.serializerForType(String);
+        final serializedBody = _serializers.serializeWith(bodySerializer, requestBody);
         final jsonrequestBody = json.encode(serializedBody);
         bodyData = jsonrequestBody;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart
index 568b5043f6d..ce622874e32 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart
@@ -38,7 +38,8 @@ class FakeClassnameTags123Api {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(modelClient);
+        final bodySerializer = _serializers.serializerForType(ModelClient);
+        final serializedBody = _serializers.serializeWith(bodySerializer, modelClient);
         final jsonmodelClient = json.encode(serializedBody);
         bodyData = jsonmodelClient;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart
index 7f79f93ca0a..e340d126ccf 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart
@@ -43,7 +43,8 @@ class PetApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(pet);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, pet);
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
@@ -347,7 +348,8 @@ class PetApi {
             'application/xml',
         ];
 
-        final serializedBody = _serializers.serialize(pet);
+        final bodySerializer = _serializers.serializerForType(Pet);
+        final serializedBody = _serializers.serializeWith(bodySerializer, pet);
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart
index 98f0a4f507b..ea1d9cbdd4f 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart
@@ -207,7 +207,8 @@ class StoreApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(order);
+        final bodySerializer = _serializers.serializerForType(Order);
+        final serializedBody = _serializers.serializeWith(bodySerializer, order);
         final jsonorder = json.encode(serializedBody);
         bodyData = jsonorder;
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart
index 52a48e251df..63865bc2443 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart
@@ -39,7 +39,8 @@ class UserApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(user);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, user);
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
@@ -402,7 +403,8 @@ class UserApi {
             'application/json',
         ];
 
-        final serializedBody = _serializers.serialize(user);
+        final bodySerializer = _serializers.serializerForType(User);
+        final serializedBody = _serializers.serializeWith(bodySerializer, user);
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-- 
GitLab


From 0c4a928ebc46544e32a3d13b46f839c279fe0d3a Mon Sep 17 00:00:00 2001
From: Peter Leibiger <kuhnroyal@gmail.com>
Date: Tue, 5 Jan 2021 02:43:17 +0100
Subject: [PATCH 22/28] [dart][dart-dio] Enable strong-mode and strict types
 (#8231)

* [dart-dio] Enable strong-mode and strict types

This will make it easier to eventually transition to NNBD. Also fix some formatting things.

* [dart-dio] Add implicit-casts: false to analysis options

* [dart-dio] Add dartanalyzer to integration tests

* raise minimum Dart version to 2.6 (to support spread collection)
* add header to all files for language version
* fix some missing imports that can be fixed (some remain due to missing inheritance support)
---
 .../dart-dio/analysis_options.mustache        |  10 +-
 .../src/main/resources/dart-dio/api.mustache  |  33 ++-
 .../main/resources/dart-dio/api_util.mustache |   1 +
 .../main/resources/dart-dio/apilib.mustache   |   1 +
 .../dart-dio/auth/api_key_auth.mustache       |  13 +-
 .../resources/dart-dio/auth/auth.mustache     |  13 +-
 .../dart-dio/auth/basic_auth.mustache         |  11 +-
 .../resources/dart-dio/auth/oauth.mustache    |  13 +-
 .../main/resources/dart-dio/class.mustache    |   2 +-
 .../main/resources/dart-dio/header.mustache   |   6 +
 .../dart-dio/local_date_serializer.mustache   |   1 +
 .../main/resources/dart-dio/model.mustache    |   1 +
 .../main/resources/dart-dio/pubspec.mustache  |   2 +-
 .../resources/dart-dio/serializers.mustache   |   1 +
 .../petstore_client_lib/analysis_options.yaml |  10 +-
 .../dart-dio/petstore_client_lib/lib/api.dart |   7 +
 .../petstore_client_lib/lib/api/pet_api.dart  | 167 ++++++-----
 .../lib/api/store_api.dart                    |  92 +++---
 .../petstore_client_lib/lib/api/user_api.dart | 142 ++++-----
 .../petstore_client_lib/lib/api_util.dart     |   7 +
 .../lib/auth/api_key_auth.dart                |  19 +-
 .../petstore_client_lib/lib/auth/auth.dart    |  17 +-
 .../lib/auth/basic_auth.dart                  |  17 +-
 .../petstore_client_lib/lib/auth/oauth.dart   |  19 +-
 .../lib/model/api_response.dart               |   9 +-
 .../lib/model/category.dart                   |   9 +-
 .../petstore_client_lib/lib/model/order.dart  |   9 +-
 .../petstore_client_lib/lib/model/pet.dart    |   9 +-
 .../petstore_client_lib/lib/model/tag.dart    |   9 +-
 .../petstore_client_lib/lib/model/user.dart   |   9 +-
 .../petstore_client_lib/lib/serializers.dart  |   7 +
 .../dart-dio/petstore_client_lib/pom.xml      |  16 +
 .../dart-dio/petstore_client_lib/pubspec.yaml |   2 +-
 .../petstore_client_lib/analysis_options.yaml |  10 +-
 .../dart-dio/petstore_client_lib/lib/api.dart |   7 +
 .../petstore_client_lib/lib/api/pet_api.dart  | 181 +++++++-----
 .../lib/api/store_api.dart                    |  92 +++---
 .../petstore_client_lib/lib/api/user_api.dart | 142 ++++-----
 .../petstore_client_lib/lib/api_util.dart     |   7 +
 .../lib/auth/api_key_auth.dart                |  19 +-
 .../petstore_client_lib/lib/auth/auth.dart    |  17 +-
 .../lib/auth/basic_auth.dart                  |  17 +-
 .../petstore_client_lib/lib/auth/oauth.dart   |  19 +-
 .../lib/model/api_response.dart               |   9 +-
 .../lib/model/category.dart                   |   9 +-
 .../lib/model/inline_object.dart              |   2 +-
 .../lib/model/inline_object1.dart             |   2 +-
 .../petstore_client_lib/lib/model/order.dart  |   9 +-
 .../petstore_client_lib/lib/model/pet.dart    |   9 +-
 .../petstore_client_lib/lib/model/tag.dart    |   9 +-
 .../petstore_client_lib/lib/model/user.dart   |   9 +-
 .../petstore_client_lib/lib/serializers.dart  |   7 +
 .../dart-dio/petstore_client_lib/pom.xml      |  16 +
 .../dart-dio/petstore_client_lib/pubspec.yaml |   2 +-
 .../analysis_options.yaml                     |  10 +-
 .../petstore_client_lib_fake/lib/api.dart     |   7 +
 .../lib/api/another_fake_api.dart             |  30 +-
 .../lib/api/default_api.dart                  |  30 +-
 .../lib/api/fake_api.dart                     | 274 +++++++++---------
 .../lib/api/fake_classname_tags123_api.dart   |  30 +-
 .../lib/api/pet_api.dart                      | 192 ++++++------
 .../lib/api/store_api.dart                    |  92 +++---
 .../lib/api/user_api.dart                     | 142 ++++-----
 .../lib/api_util.dart                         |   7 +
 .../lib/auth/api_key_auth.dart                |  19 +-
 .../lib/auth/auth.dart                        |  17 +-
 .../lib/auth/basic_auth.dart                  |  17 +-
 .../lib/auth/oauth.dart                       |  19 +-
 .../model/additional_properties_class.dart    |   9 +-
 .../lib/model/animal.dart                     |   9 +-
 .../lib/model/api_response.dart               |   9 +-
 .../model/array_of_array_of_number_only.dart  |   9 +-
 .../lib/model/array_of_number_only.dart       |   9 +-
 .../lib/model/array_test.dart                 |   9 +-
 .../lib/model/capitalization.dart             |   9 +-
 .../lib/model/cat.dart                        |   9 +-
 .../lib/model/cat_all_of.dart                 |   9 +-
 .../lib/model/category.dart                   |   9 +-
 .../lib/model/class_model.dart                |   9 +-
 .../lib/model/dog.dart                        |   9 +-
 .../lib/model/dog_all_of.dart                 |   9 +-
 .../lib/model/enum_arrays.dart                |   9 +-
 .../lib/model/enum_test.dart                  |   9 +-
 .../lib/model/file_schema_test_class.dart     |   9 +-
 .../lib/model/foo.dart                        |   9 +-
 .../lib/model/format_test.dart                |   9 +-
 .../lib/model/has_only_read_only.dart         |   9 +-
 .../lib/model/health_check_result.dart        |   9 +-
 .../lib/model/inline_object.dart              |   2 +-
 .../lib/model/inline_object1.dart             |   2 +-
 .../lib/model/inline_object2.dart             |   2 +-
 .../lib/model/inline_object3.dart             |   2 +-
 .../lib/model/inline_object4.dart             |   2 +-
 .../lib/model/inline_object5.dart             |   2 +-
 .../lib/model/inline_response_default.dart    |   9 +-
 .../lib/model/map_test.dart                   |   9 +-
 ...rties_and_additional_properties_class.dart |   9 +-
 .../lib/model/model200_response.dart          |   9 +-
 .../lib/model/model_client.dart               |   9 +-
 .../lib/model/model_enum_class.dart           |   7 +
 .../lib/model/model_file.dart                 |   9 +-
 .../lib/model/model_list.dart                 |   9 +-
 .../lib/model/model_return.dart               |   9 +-
 .../lib/model/name.dart                       |   9 +-
 .../lib/model/nullable_class.dart             |   9 +-
 .../lib/model/number_only.dart                |   9 +-
 .../lib/model/order.dart                      |   9 +-
 .../lib/model/outer_composite.dart            |   9 +-
 .../lib/model/outer_enum.dart                 |   7 +
 .../lib/model/outer_enum_default_value.dart   |   7 +
 .../lib/model/outer_enum_integer.dart         |   7 +
 .../outer_enum_integer_default_value.dart     |   7 +
 .../lib/model/pet.dart                        |   9 +-
 .../lib/model/read_only_first.dart            |   9 +-
 .../lib/model/special_model_name.dart         |   9 +-
 .../lib/model/tag.dart                        |   9 +-
 .../lib/model/user.dart                       |   9 +-
 .../lib/serializers.dart                      |   7 +
 .../dart-dio/petstore_client_lib_fake/pom.xml |  16 +
 .../petstore_client_lib_fake/pubspec.yaml     |   2 +-
 120 files changed, 1707 insertions(+), 871 deletions(-)
 create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/header.mustache

diff --git a/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache b/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache
index 655cb67bd88..a611887d3ac 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache
@@ -1 +1,9 @@
-analyzer:
\ No newline at end of file
+analyzer:
+  language:
+    strict-inference: true
+    strict-raw-types: true
+  strong-mode:
+    implicit-dynamic: false
+    implicit-casts: false
+  exclude:
+    - test/*.dart
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache
index 82b6057a683..6077a700d96 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -31,8 +32,8 @@ class {{classname}} {
     }) async {
         final String _path = '{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{baseName}}' '}', {{{paramName}}}.toString()){{/pathParams}};
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
@@ -43,15 +44,15 @@ class {{classname}} {
         {{#queryParams}}
         queryParams[r'{{baseName}}'] = {{paramName}};
         {{/queryParams}}
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [{{^hasConsumes}}];{{/hasConsumes}}{{#hasConsumes}}{{#consumes}}
+        final contentTypes = <String>[{{^hasConsumes}}];{{/hasConsumes}}{{#hasConsumes}}{{#consumes}}
             '{{{mediaType}}}',{{/consumes}}
         ];{{/hasConsumes}}
         {{#hasFormParams}}
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         {{#isMultipart}}
         {{#formParams}}
         {{^isFile}}
@@ -93,7 +94,7 @@ class {{classname}} {
         bodyData = json{{paramName}};
         {{/bodyParam}}
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
@@ -103,8 +104,8 @@ class {{classname}} {
                 responseType: ResponseType.bytes,
                 {{/isResponseFile}}
                 headers: headerParams,
-                extra: {
-                    'secure': [{{^hasAuthMethods}}],{{/hasAuthMethods}}{{#hasAuthMethods}}
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[{{^hasAuthMethods}}],{{/hasAuthMethods}}{{#hasAuthMethods}}
                         {{#authMethods}}{
                             'type': '{{type}}',
                             'name': '{{name}}',{{#isApiKey}}
@@ -130,14 +131,22 @@ class {{classname}} {
             final data = response.data as {{{returnType}}};
         {{/returnTypeIsPrimitive}}
         {{^returnTypeIsPrimitive}}
-            final serializer = _serializers.serializerForType({{{returnType}}});
-            final data = _serializers.deserializeWith<{{{returnType}}}>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType({{{returnType}}}) as Serializer<{{{returnType}}}>;
+            final data = _serializers.deserializeWith<{{{returnType}}}>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
         {{/returnTypeIsPrimitive}}
         {{/returnSimpleType}}
         {{^returnSimpleType}}
             const collectionType = {{#isMap}}BuiltMap{{/isMap}}{{^isMap}}BuiltList{{/isMap}};
             const type = FullType(collectionType, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{returnBaseType}}})]);
-            final {{{returnType}}} data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as {{{returnType}}};
         {{/returnSimpleType}}
         {{/isResponseFile}}
 
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache
index e99530f6c39..c25fc859c05 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 import 'dart:convert';
 
 import 'package:built_value/serializer.dart';
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache
index 1ad200a5a7b..645a5fe7877 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 library {{pubName}}.api;
 
 import 'package:dio/dio.dart';
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache
index dac23a9fcbc..f5dd98b6b09 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 import 'dart:async';
 import 'package:{{pubName}}/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +7,12 @@ class ApiKeyAuthInterceptor extends AuthInterceptor {
     Map<String, String> apiKeys = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "apiKey");
-        for (var info in authInfo) {
-            final authName = info["name"];
-            final authKeyName = info["keyName"];
-            final authWhere = info["where"];
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'apiKey');
+        for (final info in authInfo) {
+            final authName = info['name'] as String;
+            final authKeyName = info['keyName'] as String;
+            final authWhere = info['where'] as String;
             final apiKey = apiKeys[authName];
             if (apiKey != null) {
                 if (authWhere == 'query') {
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache
index 703127c762b..e6dbe70849d 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/auth/auth.mustache
@@ -1,5 +1,4 @@
-import 'dart:async';
-
+{{>header}}
 import 'package:dio/dio.dart';
 
 abstract class AuthInterceptor extends Interceptor {
@@ -8,11 +7,11 @@ abstract class AuthInterceptor extends Interceptor {
      * Can return null if type is not present on auth data or if route doesn't need authentication
      */
     List<Map<String, dynamic>> getAuthInfo(RequestOptions route, String type) {
-        if (route.extra.containsKey("secure")) {
-            final auth = route.extra["secure"];
-            List<Map<String, dynamic>> results = [];
-            for (var info in auth) {
-                if(info["type"] == type) {
+        if (route.extra.containsKey('secure')) {
+            final auth = route.extra['secure'] as List<Map<String, String>>;
+            final results = <Map<String, dynamic>>[];
+            for (final info in auth) {
+                if (info['type'] == type) {
                     results.add(info);
                 }
             }
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache
index bcf4b50f59e..cd5faa2dbdd 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/auth/basic_auth.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 import 'dart:async';
 import 'dart:convert';
 import 'package:{{pubName}}/auth/auth.dart';
@@ -14,13 +15,13 @@ class BasicAuthInterceptor extends AuthInterceptor {
     Map<String, BasicAuthInfo> authInfo = {};
 
     @override
-    Future onRequest(RequestOptions options) {
+    Future<dynamic> onRequest(RequestOptions options) {
         final metadataAuthInfo = getAuthInfo(options, 'basic');
-        for (var info in metadataAuthInfo) {
-            final authName = info['name'];
+        for (final info in metadataAuthInfo) {
+            final authName = info['name'] as String;
             final basicAuthInfo = authInfo[authName];
-            if(basicAuthInfo != null) {
-                String basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
+            if (basicAuthInfo != null) {
+                final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
                 options.headers['Authorization'] = basicAuth;
                 break;
             }
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache
index 282428297a8..d70e7bb380f 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/auth/oauth.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 import 'dart:async';
 import 'package:{{pubName}}/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +7,12 @@ class OAuthInterceptor extends AuthInterceptor {
     Map<String, String> tokens = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "oauth");
-        for (var info in authInfo) {
-            final token = tokens[info["name"]];
-            if(token != null) {
-                options.headers["Authorization"] = "Bearer ${token}";
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'oauth');
+        for (final info in authInfo) {
+            final token = tokens[info['name']];
+            if (token != null) {
+                options.headers['Authorization'] = 'Bearer ${token}';
                 break;
             }
         }
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache
index 37499b5a822..aef4915cc0b 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache
@@ -25,7 +25,7 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde
     static void _initializeBuilder({{{classname}}}Builder b) => b{{#vars}}{{#defaultValue}}
         ..{{{name}}} = {{#isEnum}}{{^isContainer}}const {{{classname}}}{{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}}{{/vars}};
 
-    factory {{classname}}([updates({{classname}}Builder b)]) = _${{classname}};
+    factory {{classname}}([void updates({{classname}}Builder b)]) = _${{classname}};
     static Serializer<{{classname}}> get serializer => _${{#lambda.camelcase}}{{{classname}}}{{/lambda.camelcase}}Serializer;
 }
 {{!
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/header.mustache b/modules/openapi-generator/src/main/resources/dart-dio/header.mustache
new file mode 100644
index 00000000000..2c023d48899
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart-dio/header.mustache
@@ -0,0 +1,6 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache
index 21b52dc2bc2..31440035f4a 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/serializer.dart';
 import 'package:time_machine/time_machine.dart';
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache
index b696da9cdb4..5fdbb1b77c8 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 {{#models}}
     {{#model}}
         {{#imports}}
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache
index c7e8bfd75f7..aefe59a62e5 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache
@@ -2,7 +2,7 @@ name: {{pubName}}
 version: {{pubVersion}}
 description: {{pubDescription}}
 environment:
-    sdk: ">=2.3.0 <3.0.0"
+    sdk: ">=2.6.0 <3.0.0"
 dependencies:
     dio: ^3.0.9
     built_value: ^7.1.0
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache
index 16998d739db..df9945195c6 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache
@@ -1,3 +1,4 @@
+{{>header}}
 library serializers;
 
 import 'package:built_value/iso_8601_date_time_serializer.dart';
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml b/samples/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
index 655cb67bd88..a611887d3ac 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
@@ -1 +1,9 @@
-analyzer:
\ No newline at end of file
+analyzer:
+  language:
+    strict-inference: true
+    strict-raw-types: true
+  strong-mode:
+    implicit-dynamic: false
+    implicit-casts: false
+  exclude:
+    - test/*.dart
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
index fb9635ab642..2422d33a0f3 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 library openapi.api;
 
 import 'package:dio/dio.dart';
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
index 4e37f1e056a..ad27fb633fe 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -29,16 +36,16 @@ class PetApi {
     }) async {
         final String _path = '/pet';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -48,15 +55,15 @@ class PetApi {
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -88,27 +95,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         headerParams[r'api_key'] = apiKey;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -139,27 +146,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/findByStatus';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'status'] = status;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -176,7 +183,12 @@ class PetApi {
         ).then((response) {
             const collectionType = BuiltList;
             const type = FullType(collectionType, [FullType(Pet)]);
-            final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltList<Pet>;
 
             return Response<BuiltList<Pet>>(
                 data: data,
@@ -204,27 +216,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/findByTags';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'tags'] = tags;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -241,7 +253,12 @@ class PetApi {
         ).then((response) {
             const collectionType = BuiltList;
             const type = FullType(collectionType, [FullType(Pet)]);
-            final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltList<Pet>;
 
             return Response<BuiltList<Pet>>(
                 data: data,
@@ -269,26 +286,26 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -305,8 +322,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Pet);
-            final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
+            final data = _serializers.deserializeWith<Pet>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Pet>(
                 data: data,
@@ -334,16 +354,16 @@ class PetApi {
     }) async {
         final String _path = '/pet';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -353,15 +373,15 @@ class PetApi {
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -394,33 +414,33 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/x-www-form-urlencoded',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         formData['name'] = parameterToString(_serializers, name);
         formData['status'] = parameterToString(_serializers, status);
         bodyData = formData;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -453,20 +473,20 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'multipart/form-data',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         if (additionalMetadata != null) {
             formData[r'additionalMetadata'] = parameterToString(_serializers, additionalMetadata);
         }
@@ -475,15 +495,15 @@ class PetApi {
         }
         bodyData = FormData.fromMap(formData);
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -498,8 +518,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ApiResponse);
-            final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ApiResponse) as Serializer<ApiResponse>;
+            final data = _serializers.deserializeWith<ApiResponse>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ApiResponse>(
                 data: data,
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
index 260956e4215..52aec0f2914 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -26,26 +33,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -70,26 +77,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/inventory';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -108,7 +115,12 @@ class StoreApi {
         ).then((response) {
             const collectionType = BuiltMap;
             const type = FullType(collectionType, [FullType(String), FullType(int)]);
-            final BuiltMap<String, int> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltMap<String, int>;
 
             return Response<BuiltMap<String, int>>(
                 data: data,
@@ -136,26 +148,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -165,8 +177,11 @@ class StoreApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Order);
-            final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Order) as Serializer<Order>;
+            final data = _serializers.deserializeWith<Order>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Order>(
                 data: data,
@@ -194,31 +209,31 @@ class StoreApi {
     }) async {
         final String _path = '/store/order';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
         final bodySerializer = _serializers.serializerForType(Order);
         final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -228,8 +243,11 @@ class StoreApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Order);
-            final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Order) as Serializer<Order>;
+            final data = _serializers.deserializeWith<Order>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Order>(
                 data: data,
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
index 64d59772609..f5fe2e3c8c5 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -26,31 +33,31 @@ class UserApi {
     }) async {
         final String _path = '/user';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
         final bodySerializer = _serializers.serializerForType(User);
         final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -76,31 +83,31 @@ class UserApi {
     }) async {
         final String _path = '/user/createWithArray';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
         const type = FullType(BuiltList, [FullType(User)]);
         final serializedBody = _serializers.serialize(body, specifiedType: type);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -126,31 +133,31 @@ class UserApi {
     }) async {
         final String _path = '/user/createWithList';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
         const type = FullType(BuiltList, [FullType(User)]);
         final serializedBody = _serializers.serialize(body, specifiedType: type);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -176,26 +183,26 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -221,26 +228,26 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -250,8 +257,11 @@ class UserApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(User);
-            final data = _serializers.deserializeWith<User>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(User) as Serializer<User>;
+            final data = _serializers.deserializeWith<User>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<User>(
                 data: data,
@@ -280,28 +290,28 @@ class UserApi {
     }) async {
         final String _path = '/user/login';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'username'] = username;
         queryParams[r'password'] = password;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -338,26 +348,26 @@ class UserApi {
     }) async {
         final String _path = '/user/logout';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -384,31 +394,31 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
         final bodySerializer = _serializers.serializerForType(User);
         final serializedBody = _serializers.serializeWith(bodySerializer, body);
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
index e99530f6c39..361fab65af5 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:convert';
 
 import 'package:built_value/serializer.dart';
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
index 6cde089a9a1..76c1fc890c8 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'package:openapi/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +13,12 @@ class ApiKeyAuthInterceptor extends AuthInterceptor {
     Map<String, String> apiKeys = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "apiKey");
-        for (var info in authInfo) {
-            final authName = info["name"];
-            final authKeyName = info["keyName"];
-            final authWhere = info["where"];
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'apiKey');
+        for (final info in authInfo) {
+            final authName = info['name'] as String;
+            final authKeyName = info['keyName'] as String;
+            final authWhere = info['where'] as String;
             final apiKey = apiKeys[authName];
             if (apiKey != null) {
                 if (authWhere == 'query') {
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
index 703127c762b..1cca446ee78 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
@@ -1,4 +1,9 @@
-import 'dart:async';
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
 
 import 'package:dio/dio.dart';
 
@@ -8,11 +13,11 @@ abstract class AuthInterceptor extends Interceptor {
      * Can return null if type is not present on auth data or if route doesn't need authentication
      */
     List<Map<String, dynamic>> getAuthInfo(RequestOptions route, String type) {
-        if (route.extra.containsKey("secure")) {
-            final auth = route.extra["secure"];
-            List<Map<String, dynamic>> results = [];
-            for (var info in auth) {
-                if(info["type"] == type) {
+        if (route.extra.containsKey('secure')) {
+            final auth = route.extra['secure'] as List<Map<String, String>>;
+            final results = <Map<String, dynamic>>[];
+            for (final info in auth) {
+                if (info['type'] == type) {
                     results.add(info);
                 }
             }
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
index 14334a2d288..1f9a2e281f5 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:openapi/auth/auth.dart';
@@ -14,13 +21,13 @@ class BasicAuthInterceptor extends AuthInterceptor {
     Map<String, BasicAuthInfo> authInfo = {};
 
     @override
-    Future onRequest(RequestOptions options) {
+    Future<dynamic> onRequest(RequestOptions options) {
         final metadataAuthInfo = getAuthInfo(options, 'basic');
-        for (var info in metadataAuthInfo) {
-            final authName = info['name'];
+        for (final info in metadataAuthInfo) {
+            final authName = info['name'] as String;
             final basicAuthInfo = authInfo[authName];
-            if(basicAuthInfo != null) {
-                String basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
+            if (basicAuthInfo != null) {
+                final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
                 options.headers['Authorization'] = basicAuth;
                 break;
             }
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
index 3fb06b580b9..481447bffdf 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'package:openapi/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +13,12 @@ class OAuthInterceptor extends AuthInterceptor {
     Map<String, String> tokens = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "oauth");
-        for (var info in authInfo) {
-            final token = tokens[info["name"]];
-            if(token != null) {
-                options.headers["Authorization"] = "Bearer ${token}";
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'oauth');
+        for (final info in authInfo) {
+            final token = tokens[info['name']];
+            if (token != null) {
+                options.headers['Authorization'] = 'Bearer ${token}';
                 break;
             }
         }
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
index 137b6de21ab..c5bc1e59646 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -22,7 +29,7 @@ abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
 
     static void _initializeBuilder(ApiResponseBuilder b) => b;
 
-    factory ApiResponse([updates(ApiResponseBuilder b)]) = _$ApiResponse;
+    factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse;
     static Serializer<ApiResponse> get serializer => _$apiResponseSerializer;
 }
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
index c716072d768..ddd15d54a53 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class Category implements Built<Category, CategoryBuilder> {
 
     static void _initializeBuilder(CategoryBuilder b) => b;
 
-    factory Category([updates(CategoryBuilder b)]) = _$Category;
+    factory Category([void updates(CategoryBuilder b)]) = _$Category;
     static Serializer<Category> get serializer => _$categorySerializer;
 }
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
index 517fba8eb73..f26c6213820 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -38,7 +45,7 @@ abstract class Order implements Built<Order, OrderBuilder> {
     static void _initializeBuilder(OrderBuilder b) => b
         ..complete = false;
 
-    factory Order([updates(OrderBuilder b)]) = _$Order;
+    factory Order([void updates(OrderBuilder b)]) = _$Order;
     static Serializer<Order> get serializer => _$orderSerializer;
 }
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
index 1fb992db794..98757f5e7ce 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/tag.dart';
 import 'package:built_collection/built_collection.dart';
 import 'package:openapi/model/category.dart';
@@ -39,7 +46,7 @@ abstract class Pet implements Built<Pet, PetBuilder> {
 
     static void _initializeBuilder(PetBuilder b) => b;
 
-    factory Pet([updates(PetBuilder b)]) = _$Pet;
+    factory Pet([void updates(PetBuilder b)]) = _$Pet;
     static Serializer<Pet> get serializer => _$petSerializer;
 }
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
index 8149a7d3498..528acd843e7 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class Tag implements Built<Tag, TagBuilder> {
 
     static void _initializeBuilder(TagBuilder b) => b;
 
-    factory Tag([updates(TagBuilder b)]) = _$Tag;
+    factory Tag([void updates(TagBuilder b)]) = _$Tag;
     static Serializer<Tag> get serializer => _$tagSerializer;
 }
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
index 3fd4092d546..93259a43019 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -43,7 +50,7 @@ abstract class User implements Built<User, UserBuilder> {
 
     static void _initializeBuilder(UserBuilder b) => b;
 
-    factory User([updates(UserBuilder b)]) = _$User;
+    factory User([void updates(UserBuilder b)]) = _$User;
     static Serializer<User> get serializer => _$userSerializer;
 }
 
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
index 5db183b7438..f90fdd7603a 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 library serializers;
 
 import 'package:built_value/iso_8601_date_time_serializer.dart';
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml b/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
index 4f661ca5a8d..3b0a69b823f 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
@@ -67,6 +67,22 @@
                             </arguments>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>dartanalyzer</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>dartanalyzer</executable>
+                            <arguments>
+                                <argument>--fatal-infos</argument>
+                                <argument>--options</argument>
+                                <argument>analysis_options.yaml</argument>
+                                <argument>.</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
                     <execution>
                         <id>pub-test</id>
                         <phase>integration-test</phase>
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml b/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
index 20b190aa1d3..c7c5c5aec83 100644
--- a/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
@@ -2,7 +2,7 @@ name: openapi
 version: 1.0.0
 description: OpenAPI API client
 environment:
-    sdk: ">=2.3.0 <3.0.0"
+    sdk: ">=2.6.0 <3.0.0"
 dependencies:
     dio: ^3.0.9
     built_value: ^7.1.0
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
index 655cb67bd88..a611887d3ac 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
@@ -1 +1,9 @@
-analyzer:
\ No newline at end of file
+analyzer:
+  language:
+    strict-inference: true
+    strict-raw-types: true
+  strong-mode:
+    implicit-dynamic: false
+    implicit-casts: false
+  exclude:
+    - test/*.dart
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
index fb9635ab642..2422d33a0f3 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 library openapi.api;
 
 import 'package:dio/dio.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
index 646a68b206e..656042743a5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -29,16 +36,16 @@ class PetApi {
     }) async {
         final String _path = '/pet';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -48,15 +55,15 @@ class PetApi {
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -71,8 +78,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Pet);
-            final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
+            final data = _serializers.deserializeWith<Pet>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Pet>(
                 data: data,
@@ -101,27 +111,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         headerParams[r'api_key'] = apiKey;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -152,27 +162,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/findByStatus';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'status'] = status;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -189,7 +199,12 @@ class PetApi {
         ).then((response) {
             const collectionType = BuiltList;
             const type = FullType(collectionType, [FullType(Pet)]);
-            final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltList<Pet>;
 
             return Response<BuiltList<Pet>>(
                 data: data,
@@ -217,27 +232,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/findByTags';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'tags'] = tags;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -254,7 +269,12 @@ class PetApi {
         ).then((response) {
             const collectionType = BuiltList;
             const type = FullType(collectionType, [FullType(Pet)]);
-            final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltList<Pet>;
 
             return Response<BuiltList<Pet>>(
                 data: data,
@@ -282,26 +302,26 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -318,8 +338,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Pet);
-            final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
+            final data = _serializers.deserializeWith<Pet>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Pet>(
                 data: data,
@@ -347,16 +370,16 @@ class PetApi {
     }) async {
         final String _path = '/pet';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -366,15 +389,15 @@ class PetApi {
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -389,8 +412,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Pet);
-            final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
+            final data = _serializers.deserializeWith<Pet>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Pet>(
                 data: data,
@@ -420,33 +446,33 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/x-www-form-urlencoded',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         formData['name'] = parameterToString(_serializers, name);
         formData['status'] = parameterToString(_serializers, status);
         bodyData = formData;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -479,20 +505,20 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'multipart/form-data',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         if (additionalMetadata != null) {
             formData[r'additionalMetadata'] = parameterToString(_serializers, additionalMetadata);
         }
@@ -501,15 +527,15 @@ class PetApi {
         }
         bodyData = FormData.fromMap(formData);
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -524,8 +550,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ApiResponse);
-            final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ApiResponse) as Serializer<ApiResponse>;
+            final data = _serializers.deserializeWith<ApiResponse>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ApiResponse>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
index e7f61eb6409..607f7a97074 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -26,26 +33,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -70,26 +77,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/inventory';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -108,7 +115,12 @@ class StoreApi {
         ).then((response) {
             const collectionType = BuiltMap;
             const type = FullType(collectionType, [FullType(String), FullType(int)]);
-            final BuiltMap<String, int> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltMap<String, int>;
 
             return Response<BuiltMap<String, int>>(
                 data: data,
@@ -136,26 +148,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/order/{orderId}'.replaceAll('{' r'orderId' '}', orderId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -165,8 +177,11 @@ class StoreApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Order);
-            final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Order) as Serializer<Order>;
+            final data = _serializers.deserializeWith<Order>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Order>(
                 data: data,
@@ -194,16 +209,16 @@ class StoreApi {
     }) async {
         final String _path = '/store/order';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -212,15 +227,15 @@ class StoreApi {
         final jsonorder = json.encode(serializedBody);
         bodyData = jsonorder;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -230,8 +245,11 @@ class StoreApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Order);
-            final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Order) as Serializer<Order>;
+            final data = _serializers.deserializeWith<Order>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Order>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
index b3291c98cda..614fe438980 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -26,16 +33,16 @@ class UserApi {
     }) async {
         final String _path = '/user';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -44,15 +51,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -85,16 +92,16 @@ class UserApi {
     }) async {
         final String _path = '/user/createWithArray';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -103,15 +110,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -144,16 +151,16 @@ class UserApi {
     }) async {
         final String _path = '/user/createWithList';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -162,15 +169,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -203,26 +210,26 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -255,26 +262,26 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -284,8 +291,11 @@ class UserApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(User);
-            final data = _serializers.deserializeWith<User>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(User) as Serializer<User>;
+            final data = _serializers.deserializeWith<User>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<User>(
                 data: data,
@@ -314,28 +324,28 @@ class UserApi {
     }) async {
         final String _path = '/user/login';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'username'] = username;
         queryParams[r'password'] = password;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -372,26 +382,26 @@ class UserApi {
     }) async {
         final String _path = '/user/logout';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -425,16 +435,16 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -443,15 +453,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
index e99530f6c39..361fab65af5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:convert';
 
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
index 6cde089a9a1..76c1fc890c8 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'package:openapi/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +13,12 @@ class ApiKeyAuthInterceptor extends AuthInterceptor {
     Map<String, String> apiKeys = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "apiKey");
-        for (var info in authInfo) {
-            final authName = info["name"];
-            final authKeyName = info["keyName"];
-            final authWhere = info["where"];
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'apiKey');
+        for (final info in authInfo) {
+            final authName = info['name'] as String;
+            final authKeyName = info['keyName'] as String;
+            final authWhere = info['where'] as String;
             final apiKey = apiKeys[authName];
             if (apiKey != null) {
                 if (authWhere == 'query') {
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
index 703127c762b..1cca446ee78 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
@@ -1,4 +1,9 @@
-import 'dart:async';
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
 
 import 'package:dio/dio.dart';
 
@@ -8,11 +13,11 @@ abstract class AuthInterceptor extends Interceptor {
      * Can return null if type is not present on auth data or if route doesn't need authentication
      */
     List<Map<String, dynamic>> getAuthInfo(RequestOptions route, String type) {
-        if (route.extra.containsKey("secure")) {
-            final auth = route.extra["secure"];
-            List<Map<String, dynamic>> results = [];
-            for (var info in auth) {
-                if(info["type"] == type) {
+        if (route.extra.containsKey('secure')) {
+            final auth = route.extra['secure'] as List<Map<String, String>>;
+            final results = <Map<String, dynamic>>[];
+            for (final info in auth) {
+                if (info['type'] == type) {
                     results.add(info);
                 }
             }
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
index 14334a2d288..1f9a2e281f5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:openapi/auth/auth.dart';
@@ -14,13 +21,13 @@ class BasicAuthInterceptor extends AuthInterceptor {
     Map<String, BasicAuthInfo> authInfo = {};
 
     @override
-    Future onRequest(RequestOptions options) {
+    Future<dynamic> onRequest(RequestOptions options) {
         final metadataAuthInfo = getAuthInfo(options, 'basic');
-        for (var info in metadataAuthInfo) {
-            final authName = info['name'];
+        for (final info in metadataAuthInfo) {
+            final authName = info['name'] as String;
             final basicAuthInfo = authInfo[authName];
-            if(basicAuthInfo != null) {
-                String basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
+            if (basicAuthInfo != null) {
+                final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
                 options.headers['Authorization'] = basicAuth;
                 break;
             }
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
index 3fb06b580b9..481447bffdf 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'package:openapi/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +13,12 @@ class OAuthInterceptor extends AuthInterceptor {
     Map<String, String> tokens = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "oauth");
-        for (var info in authInfo) {
-            final token = tokens[info["name"]];
-            if(token != null) {
-                options.headers["Authorization"] = "Bearer ${token}";
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'oauth');
+        for (final info in authInfo) {
+            final token = tokens[info['name']];
+            if (token != null) {
+                options.headers['Authorization'] = 'Bearer ${token}';
                 break;
             }
         }
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
index 137b6de21ab..c5bc1e59646 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -22,7 +29,7 @@ abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
 
     static void _initializeBuilder(ApiResponseBuilder b) => b;
 
-    factory ApiResponse([updates(ApiResponseBuilder b)]) = _$ApiResponse;
+    factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse;
     static Serializer<ApiResponse> get serializer => _$apiResponseSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
index c716072d768..ddd15d54a53 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class Category implements Built<Category, CategoryBuilder> {
 
     static void _initializeBuilder(CategoryBuilder b) => b;
 
-    factory Category([updates(CategoryBuilder b)]) = _$Category;
+    factory Category([void updates(CategoryBuilder b)]) = _$Category;
     static Serializer<Category> get serializer => _$categorySerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object.dart
index b1477f60e8c..fb32b70cfa0 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object.dart
@@ -20,7 +20,7 @@ abstract class InlineObject implements Built<InlineObject, InlineObjectBuilder>
 
     static void _initializeBuilder(InlineObjectBuilder b) => b;
 
-    factory InlineObject([updates(InlineObjectBuilder b)]) = _$InlineObject;
+    factory InlineObject([void updates(InlineObjectBuilder b)]) = _$InlineObject;
     static Serializer<InlineObject> get serializer => _$inlineObjectSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object1.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object1.dart
index 2eadc367d2d..73064295609 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object1.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/inline_object1.dart
@@ -21,7 +21,7 @@ abstract class InlineObject1 implements Built<InlineObject1, InlineObject1Builde
 
     static void _initializeBuilder(InlineObject1Builder b) => b;
 
-    factory InlineObject1([updates(InlineObject1Builder b)]) = _$InlineObject1;
+    factory InlineObject1([void updates(InlineObject1Builder b)]) = _$InlineObject1;
     static Serializer<InlineObject1> get serializer => _$inlineObject1Serializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
index 517fba8eb73..f26c6213820 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -38,7 +45,7 @@ abstract class Order implements Built<Order, OrderBuilder> {
     static void _initializeBuilder(OrderBuilder b) => b
         ..complete = false;
 
-    factory Order([updates(OrderBuilder b)]) = _$Order;
+    factory Order([void updates(OrderBuilder b)]) = _$Order;
     static Serializer<Order> get serializer => _$orderSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
index 1fb992db794..98757f5e7ce 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/tag.dart';
 import 'package:built_collection/built_collection.dart';
 import 'package:openapi/model/category.dart';
@@ -39,7 +46,7 @@ abstract class Pet implements Built<Pet, PetBuilder> {
 
     static void _initializeBuilder(PetBuilder b) => b;
 
-    factory Pet([updates(PetBuilder b)]) = _$Pet;
+    factory Pet([void updates(PetBuilder b)]) = _$Pet;
     static Serializer<Pet> get serializer => _$petSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
index 8149a7d3498..528acd843e7 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class Tag implements Built<Tag, TagBuilder> {
 
     static void _initializeBuilder(TagBuilder b) => b;
 
-    factory Tag([updates(TagBuilder b)]) = _$Tag;
+    factory Tag([void updates(TagBuilder b)]) = _$Tag;
     static Serializer<Tag> get serializer => _$tagSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
index 3fd4092d546..93259a43019 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -43,7 +50,7 @@ abstract class User implements Built<User, UserBuilder> {
 
     static void _initializeBuilder(UserBuilder b) => b;
 
-    factory User([updates(UserBuilder b)]) = _$User;
+    factory User([void updates(UserBuilder b)]) = _$User;
     static Serializer<User> get serializer => _$userSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
index 5db183b7438..f90fdd7603a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 library serializers;
 
 import 'package:built_value/iso_8601_date_time_serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml
index 83864912ce7..190da84cc44 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pom.xml
@@ -67,6 +67,22 @@
                             </arguments>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>dartanalyzer</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>dartanalyzer</executable>
+                            <arguments>
+                                <argument>--fatal-infos</argument>
+                                <argument>--options</argument>
+                                <argument>analysis_options.yaml</argument>
+                                <argument>.</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
                     <execution>
                         <id>pub-test</id>
                         <phase>integration-test</phase>
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
index 20b190aa1d3..c7c5c5aec83 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
@@ -2,7 +2,7 @@ name: openapi
 version: 1.0.0
 description: OpenAPI API client
 environment:
-    sdk: ">=2.3.0 <3.0.0"
+    sdk: ">=2.6.0 <3.0.0"
 dependencies:
     dio: ^3.0.9
     built_value: ^7.1.0
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml
index 655cb67bd88..a611887d3ac 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/analysis_options.yaml
@@ -1 +1,9 @@
-analyzer:
\ No newline at end of file
+analyzer:
+  language:
+    strict-inference: true
+    strict-raw-types: true
+  strong-mode:
+    implicit-dynamic: false
+    implicit-casts: false
+  exclude:
+    - test/*.dart
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart
index b614ff61186..3e1dec02f81 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 library openapi.api;
 
 import 'package:dio/dio.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart
index b0a1bb7491b..45a3a87bc75 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -25,16 +32,16 @@ class AnotherFakeApi {
     }) async {
         final String _path = '/another-fake/dummy';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -43,15 +50,15 @@ class AnotherFakeApi {
         final jsonmodelClient = json.encode(serializedBody);
         bodyData = jsonmodelClient;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'patch'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -61,8 +68,11 @@ class AnotherFakeApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ModelClient);
-            final data = _serializers.deserializeWith<ModelClient>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ModelClient) as Serializer<ModelClient>;
+            final data = _serializers.deserializeWith<ModelClient>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ModelClient>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart
index 4ddaced7faf..1e93ce8718a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -24,26 +31,26 @@ class DefaultApi {
     }) async {
         final String _path = '/foo';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -53,8 +60,11 @@ class DefaultApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(InlineResponseDefault);
-            final data = _serializers.deserializeWith<InlineResponseDefault>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(InlineResponseDefault) as Serializer<InlineResponseDefault>;
+            final data = _serializers.deserializeWith<InlineResponseDefault>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<InlineResponseDefault>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart
index 4e054b7de8a..1753f6e4306 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -32,26 +39,26 @@ class FakeApi {
     }) async {
         final String _path = '/fake/health';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -61,8 +68,11 @@ class FakeApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(HealthCheckResult);
-            final data = _serializers.deserializeWith<HealthCheckResult>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(HealthCheckResult) as Serializer<HealthCheckResult>;
+            final data = _serializers.deserializeWith<HealthCheckResult>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<HealthCheckResult>(
                 data: data,
@@ -92,18 +102,18 @@ class FakeApi {
     }) async {
         final String _path = '/fake/http-signature-test';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         headerParams[r'header_1'] = header1;
         queryParams[r'query_1'] = query1;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -113,15 +123,15 @@ class FakeApi {
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'http',
                             'name': 'http_signature_test',
@@ -152,16 +162,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake/outer/boolean';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -169,15 +179,15 @@ class FakeApi {
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -215,16 +225,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake/outer/composite';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -233,15 +243,15 @@ class FakeApi {
         final jsonouterComposite = json.encode(serializedBody);
         bodyData = jsonouterComposite;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -251,8 +261,11 @@ class FakeApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(OuterComposite);
-            final data = _serializers.deserializeWith<OuterComposite>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(OuterComposite) as Serializer<OuterComposite>;
+            final data = _serializers.deserializeWith<OuterComposite>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<OuterComposite>(
                 data: data,
@@ -280,16 +293,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake/outer/number';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -297,15 +310,15 @@ class FakeApi {
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -343,16 +356,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake/outer/string';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -360,15 +373,15 @@ class FakeApi {
         final jsonbody = json.encode(serializedBody);
         bodyData = jsonbody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -406,16 +419,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake/body-with-file-schema';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -424,15 +437,15 @@ class FakeApi {
         final jsonfileSchemaTestClass = json.encode(serializedBody);
         bodyData = jsonfileSchemaTestClass;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -459,17 +472,17 @@ class FakeApi {
     }) async {
         final String _path = '/fake/body-with-query-params';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'query'] = query;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -478,15 +491,15 @@ class FakeApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -512,16 +525,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -530,15 +543,15 @@ class FakeApi {
         final jsonmodelClient = json.encode(serializedBody);
         bodyData = jsonmodelClient;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'patch'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -548,8 +561,11 @@ class FakeApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ModelClient);
-            final data = _serializers.deserializeWith<ModelClient>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ModelClient) as Serializer<ModelClient>;
+            final data = _serializers.deserializeWith<ModelClient>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ModelClient>(
                 data: data,
@@ -590,20 +606,20 @@ class FakeApi {
     }) async {
         final String _path = '/fake';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/x-www-form-urlencoded',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         formData['integer'] = parameterToString(_serializers, integer);
         formData['int32'] = parameterToString(_serializers, int32);
         formData['int64'] = parameterToString(_serializers, int64);
@@ -620,15 +636,15 @@ class FakeApi {
         formData['callback'] = parameterToString(_serializers, callback);
         bodyData = formData;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'http',
                             'name': 'http_basic_test',
@@ -666,8 +682,8 @@ class FakeApi {
     }) async {
         final String _path = '/fake';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
@@ -678,27 +694,27 @@ class FakeApi {
         queryParams[r'enum_query_string'] = enumQueryString;
         queryParams[r'enum_query_integer'] = enumQueryInteger;
         queryParams[r'enum_query_double'] = enumQueryDouble;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/x-www-form-urlencoded',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         formData['enum_form_string_array'] = parameterToString(_serializers, enumFormStringArray);
         formData['enum_form_string'] = parameterToString(_serializers, enumFormString);
         bodyData = formData;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -729,8 +745,8 @@ class FakeApi {
     }) async {
         final String _path = '/fake';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
@@ -741,20 +757,20 @@ class FakeApi {
         queryParams[r'required_int64_group'] = requiredInt64Group;
         queryParams[r'string_group'] = stringGroup;
         queryParams[r'int64_group'] = int64Group;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'http',
                             'name': 'bearer_test',
@@ -785,16 +801,16 @@ class FakeApi {
     }) async {
         final String _path = '/fake/inline-additionalProperties';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -803,15 +819,15 @@ class FakeApi {
         final jsonrequestBody = json.encode(serializedBody);
         bodyData = jsonrequestBody;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -838,33 +854,33 @@ class FakeApi {
     }) async {
         final String _path = '/fake/jsonFormData';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/x-www-form-urlencoded',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         formData['param'] = parameterToString(_serializers, param);
         formData['param2'] = parameterToString(_serializers, param2);
         bodyData = formData;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -894,8 +910,8 @@ class FakeApi {
     }) async {
         final String _path = '/fake/test-query-paramters';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
@@ -905,20 +921,20 @@ class FakeApi {
         queryParams[r'http'] = http;
         queryParams[r'url'] = url;
         queryParams[r'context'] = context;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart
index ce622874e32..823e380156b 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -25,16 +32,16 @@ class FakeClassnameTags123Api {
     }) async {
         final String _path = '/fake_classname_test';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -43,15 +50,15 @@ class FakeClassnameTags123Api {
         final jsonmodelClient = json.encode(serializedBody);
         bodyData = jsonmodelClient;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'patch'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key_query',
@@ -68,8 +75,11 @@ class FakeClassnameTags123Api {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ModelClient);
-            final data = _serializers.deserializeWith<ModelClient>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ModelClient) as Serializer<ModelClient>;
+            final data = _serializers.deserializeWith<ModelClient>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ModelClient>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart
index e340d126ccf..6a1f23b0fc7 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -29,16 +36,16 @@ class PetApi {
     }) async {
         final String _path = '/pet';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -48,15 +55,15 @@ class PetApi {
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -88,27 +95,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         headerParams[r'api_key'] = apiKey;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -139,27 +146,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/findByStatus';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'status'] = status;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -176,7 +183,12 @@ class PetApi {
         ).then((response) {
             const collectionType = BuiltList;
             const type = FullType(collectionType, [FullType(Pet)]);
-            final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltList<Pet>;
 
             return Response<BuiltList<Pet>>(
                 data: data,
@@ -204,27 +216,27 @@ class PetApi {
     }) async {
         final String _path = '/pet/findByTags';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'tags'] = tags;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -241,7 +253,12 @@ class PetApi {
         ).then((response) {
             const collectionType = BuiltList;
             const type = FullType(collectionType, [FullType(Pet)]);
-            final BuiltList<Pet> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltList<Pet>;
 
             return Response<BuiltList<Pet>>(
                 data: data,
@@ -269,26 +286,26 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -305,8 +322,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Pet);
-            final data = _serializers.deserializeWith<Pet>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Pet) as Serializer<Pet>;
+            final data = _serializers.deserializeWith<Pet>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Pet>(
                 data: data,
@@ -334,16 +354,16 @@ class PetApi {
     }) async {
         final String _path = '/pet';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
             'application/xml',
         ];
@@ -353,15 +373,15 @@ class PetApi {
         final jsonpet = json.encode(serializedBody);
         bodyData = jsonpet;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -394,33 +414,33 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/x-www-form-urlencoded',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         formData['name'] = parameterToString(_serializers, name);
         formData['status'] = parameterToString(_serializers, status);
         bodyData = formData;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -453,20 +473,20 @@ class PetApi {
     }) async {
         final String _path = '/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'multipart/form-data',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         if (additionalMetadata != null) {
             formData[r'additionalMetadata'] = parameterToString(_serializers, additionalMetadata);
         }
@@ -475,15 +495,15 @@ class PetApi {
         }
         bodyData = FormData.fromMap(formData);
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -498,8 +518,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ApiResponse);
-            final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ApiResponse) as Serializer<ApiResponse>;
+            final data = _serializers.deserializeWith<ApiResponse>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ApiResponse>(
                 data: data,
@@ -529,20 +552,20 @@ class PetApi {
     }) async {
         final String _path = '/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'multipart/form-data',
         ];
 
-        final Map<String, dynamic> formData = {};
+        final formData = <String, dynamic>{};
         if (additionalMetadata != null) {
             formData[r'additionalMetadata'] = parameterToString(_serializers, additionalMetadata);
         }
@@ -551,15 +574,15 @@ class PetApi {
         }
         bodyData = FormData.fromMap(formData);
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'oauth2',
                             'name': 'petstore_auth',
@@ -574,8 +597,11 @@ class PetApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(ApiResponse);
-            final data = _serializers.deserializeWith<ApiResponse>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(ApiResponse) as Serializer<ApiResponse>;
+            final data = _serializers.deserializeWith<ApiResponse>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<ApiResponse>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart
index ea1d9cbdd4f..f715db922d0 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -26,26 +33,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -70,26 +77,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/inventory';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[
                         {
                             'type': 'apiKey',
                             'name': 'api_key',
@@ -108,7 +115,12 @@ class StoreApi {
         ).then((response) {
             const collectionType = BuiltMap;
             const type = FullType(collectionType, [FullType(String), FullType(int)]);
-            final BuiltMap<String, int> data = _serializers.deserialize(response.data is String ? jsonDecode(response.data) : response.data, specifiedType: type);
+            final data = _serializers.deserialize(
+                response.data is String
+                ? jsonDecode(response.data as String)
+                : response.data,
+                specifiedType: type,
+            ) as BuiltMap<String, int>;
 
             return Response<BuiltMap<String, int>>(
                 data: data,
@@ -136,26 +148,26 @@ class StoreApi {
     }) async {
         final String _path = '/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -165,8 +177,11 @@ class StoreApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Order);
-            final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Order) as Serializer<Order>;
+            final data = _serializers.deserializeWith<Order>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Order>(
                 data: data,
@@ -194,16 +209,16 @@ class StoreApi {
     }) async {
         final String _path = '/store/order';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -212,15 +227,15 @@ class StoreApi {
         final jsonorder = json.encode(serializedBody);
         bodyData = jsonorder;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -230,8 +245,11 @@ class StoreApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(Order);
-            final data = _serializers.deserializeWith<Order>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(Order) as Serializer<Order>;
+            final data = _serializers.deserializeWith<Order>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<Order>(
                 data: data,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart
index 63865bc2443..3adca92b7b1 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:dio/dio.dart';
@@ -26,16 +33,16 @@ class UserApi {
     }) async {
         final String _path = '/user';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -44,15 +51,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -78,16 +85,16 @@ class UserApi {
     }) async {
         final String _path = '/user/createWithArray';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -96,15 +103,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -130,16 +137,16 @@ class UserApi {
     }) async {
         final String _path = '/user/createWithList';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -148,15 +155,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'post'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -182,26 +189,26 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'delete'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -227,26 +234,26 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -256,8 +263,11 @@ class UserApi {
             onSendProgress: onSendProgress,
             onReceiveProgress: onReceiveProgress,
         ).then((response) {
-            final serializer = _serializers.serializerForType(User);
-            final data = _serializers.deserializeWith<User>(serializer, response.data is String ? jsonDecode(response.data) : response.data);
+            final serializer = _serializers.serializerForType(User) as Serializer<User>;
+            final data = _serializers.deserializeWith<User>(
+                serializer,
+                response.data is String ? jsonDecode(response.data as String) : response.data,
+            );
 
             return Response<User>(
                 data: data,
@@ -286,28 +296,28 @@ class UserApi {
     }) async {
         final String _path = '/user/login';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
         queryParams[r'username'] = username;
         queryParams[r'password'] = password;
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -344,26 +354,26 @@ class UserApi {
     }) async {
         final String _path = '/user/logout';
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [];
+        final contentTypes = <String>[];
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'get'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
@@ -390,16 +400,16 @@ class UserApi {
     }) async {
         final String _path = '/user/{username}'.replaceAll('{' r'username' '}', username.toString());
 
-        final Map<String, dynamic> queryParams = {};
-        final Map<String, dynamic> headerParams = {
+        final queryParams = <String, dynamic>{};
+        final headerParams = <String, dynamic>{
             if (headers != null) ...headers,
         };
         dynamic bodyData;
 
-        queryParams.removeWhere((key, value) => value == null);
-        headerParams.removeWhere((key, value) => value == null);
+        queryParams.removeWhere((key, dynamic value) => value == null);
+        headerParams.removeWhere((key, dynamic value) => value == null);
 
-        final List<String> contentTypes = [
+        final contentTypes = <String>[
             'application/json',
         ];
 
@@ -408,15 +418,15 @@ class UserApi {
         final jsonuser = json.encode(serializedBody);
         bodyData = jsonuser;
 
-        return _dio.request(
+        return _dio.request<dynamic>(
             _path,
             queryParameters: queryParams,
             data: bodyData,
             options: Options(
                 method: 'put'.toUpperCase(),
                 headers: headerParams,
-                extra: {
-                    'secure': [],
+                extra: <String, dynamic>{
+                    'secure': <Map<String, String>>[],
                     if (extra != null) ...extra,
                 },
                 validateStatus: validateStatus,
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart
index e99530f6c39..361fab65af5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:convert';
 
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart
index 6cde089a9a1..76c1fc890c8 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'package:openapi/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +13,12 @@ class ApiKeyAuthInterceptor extends AuthInterceptor {
     Map<String, String> apiKeys = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "apiKey");
-        for (var info in authInfo) {
-            final authName = info["name"];
-            final authKeyName = info["keyName"];
-            final authWhere = info["where"];
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'apiKey');
+        for (final info in authInfo) {
+            final authName = info['name'] as String;
+            final authKeyName = info['keyName'] as String;
+            final authWhere = info['where'] as String;
             final apiKey = apiKeys[authName];
             if (apiKey != null) {
                 if (authWhere == 'query') {
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart
index 703127c762b..1cca446ee78 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/auth.dart
@@ -1,4 +1,9 @@
-import 'dart:async';
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
 
 import 'package:dio/dio.dart';
 
@@ -8,11 +13,11 @@ abstract class AuthInterceptor extends Interceptor {
      * Can return null if type is not present on auth data or if route doesn't need authentication
      */
     List<Map<String, dynamic>> getAuthInfo(RequestOptions route, String type) {
-        if (route.extra.containsKey("secure")) {
-            final auth = route.extra["secure"];
-            List<Map<String, dynamic>> results = [];
-            for (var info in auth) {
-                if(info["type"] == type) {
+        if (route.extra.containsKey('secure')) {
+            final auth = route.extra['secure'] as List<Map<String, String>>;
+            final results = <Map<String, dynamic>>[];
+            for (final info in auth) {
+                if (info['type'] == type) {
                     results.add(info);
                 }
             }
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart
index 14334a2d288..1f9a2e281f5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/basic_auth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'dart:convert';
 import 'package:openapi/auth/auth.dart';
@@ -14,13 +21,13 @@ class BasicAuthInterceptor extends AuthInterceptor {
     Map<String, BasicAuthInfo> authInfo = {};
 
     @override
-    Future onRequest(RequestOptions options) {
+    Future<dynamic> onRequest(RequestOptions options) {
         final metadataAuthInfo = getAuthInfo(options, 'basic');
-        for (var info in metadataAuthInfo) {
-            final authName = info['name'];
+        for (final info in metadataAuthInfo) {
+            final authName = info['name'] as String;
             final basicAuthInfo = authInfo[authName];
-            if(basicAuthInfo != null) {
-                String basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
+            if (basicAuthInfo != null) {
+                final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'));
                 options.headers['Authorization'] = basicAuth;
                 break;
             }
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart
index 3fb06b580b9..481447bffdf 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/oauth.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:async';
 import 'package:openapi/auth/auth.dart';
 import 'package:dio/dio.dart';
@@ -6,12 +13,12 @@ class OAuthInterceptor extends AuthInterceptor {
     Map<String, String> tokens = {};
 
     @override
-    Future onRequest(RequestOptions options) {
-        final authInfo = getAuthInfo(options, "oauth");
-        for (var info in authInfo) {
-            final token = tokens[info["name"]];
-            if(token != null) {
-                options.headers["Authorization"] = "Bearer ${token}";
+    Future<dynamic> onRequest(RequestOptions options) {
+        final authInfo = getAuthInfo(options, 'oauth');
+        for (final info in authInfo) {
+            final token = tokens[info['name']];
+            if (token != null) {
+                options.headers['Authorization'] = 'Bearer ${token}';
                 break;
             }
         }
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart
index 231d14a7307..c45491b84ba 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/additional_properties_class.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -19,7 +26,7 @@ abstract class AdditionalPropertiesClass implements Built<AdditionalPropertiesCl
 
     static void _initializeBuilder(AdditionalPropertiesClassBuilder b) => b;
 
-    factory AdditionalPropertiesClass([updates(AdditionalPropertiesClassBuilder b)]) = _$AdditionalPropertiesClass;
+    factory AdditionalPropertiesClass([void updates(AdditionalPropertiesClassBuilder b)]) = _$AdditionalPropertiesClass;
     static Serializer<AdditionalPropertiesClass> get serializer => _$additionalPropertiesClassSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart
index 9c95b826bcc..ffbfe2ab5d6 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/animal.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -19,7 +26,7 @@ abstract class Animal implements Built<Animal, AnimalBuilder> {
     static void _initializeBuilder(AnimalBuilder b) => b
         ..color = 'red';
 
-    factory Animal([updates(AnimalBuilder b)]) = _$Animal;
+    factory Animal([void updates(AnimalBuilder b)]) = _$Animal;
     static Serializer<Animal> get serializer => _$animalSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart
index 137b6de21ab..c5bc1e59646 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/api_response.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -22,7 +29,7 @@ abstract class ApiResponse implements Built<ApiResponse, ApiResponseBuilder> {
 
     static void _initializeBuilder(ApiResponseBuilder b) => b;
 
-    factory ApiResponse([updates(ApiResponseBuilder b)]) = _$ApiResponse;
+    factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse;
     static Serializer<ApiResponse> get serializer => _$apiResponseSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart
index d2700a8356f..4345860869a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -15,7 +22,7 @@ abstract class ArrayOfArrayOfNumberOnly implements Built<ArrayOfArrayOfNumberOnl
 
     static void _initializeBuilder(ArrayOfArrayOfNumberOnlyBuilder b) => b;
 
-    factory ArrayOfArrayOfNumberOnly([updates(ArrayOfArrayOfNumberOnlyBuilder b)]) = _$ArrayOfArrayOfNumberOnly;
+    factory ArrayOfArrayOfNumberOnly([void updates(ArrayOfArrayOfNumberOnlyBuilder b)]) = _$ArrayOfArrayOfNumberOnly;
     static Serializer<ArrayOfArrayOfNumberOnly> get serializer => _$arrayOfArrayOfNumberOnlySerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart
index 86f09a92bd6..6198926fae6 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_of_number_only.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -15,7 +22,7 @@ abstract class ArrayOfNumberOnly implements Built<ArrayOfNumberOnly, ArrayOfNumb
 
     static void _initializeBuilder(ArrayOfNumberOnlyBuilder b) => b;
 
-    factory ArrayOfNumberOnly([updates(ArrayOfNumberOnlyBuilder b)]) = _$ArrayOfNumberOnly;
+    factory ArrayOfNumberOnly([void updates(ArrayOfNumberOnlyBuilder b)]) = _$ArrayOfNumberOnly;
     static Serializer<ArrayOfNumberOnly> get serializer => _$arrayOfNumberOnlySerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart
index cb602702bb9..9aa9ea6d18c 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/array_test.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:openapi/model/read_only_first.dart';
 import 'package:built_value/built_value.dart';
@@ -24,7 +31,7 @@ abstract class ArrayTest implements Built<ArrayTest, ArrayTestBuilder> {
 
     static void _initializeBuilder(ArrayTestBuilder b) => b;
 
-    factory ArrayTest([updates(ArrayTestBuilder b)]) = _$ArrayTest;
+    factory ArrayTest([void updates(ArrayTestBuilder b)]) = _$ArrayTest;
     static Serializer<ArrayTest> get serializer => _$arrayTestSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart
index 41364d53b56..ba0c23da73a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/capitalization.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -35,7 +42,7 @@ abstract class Capitalization implements Built<Capitalization, CapitalizationBui
 
     static void _initializeBuilder(CapitalizationBuilder b) => b;
 
-    factory Capitalization([updates(CapitalizationBuilder b)]) = _$Capitalization;
+    factory Capitalization([void updates(CapitalizationBuilder b)]) = _$Capitalization;
     static Serializer<Capitalization> get serializer => _$capitalizationSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart
index 946f3353413..2fe5aa122ff 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/animal.dart';
 import 'package:openapi/model/cat_all_of.dart';
 import 'package:built_value/built_value.dart';
@@ -25,7 +32,7 @@ abstract class Cat implements Built<Cat, CatBuilder> {
     static void _initializeBuilder(CatBuilder b) => b
         ..color = 'red';
 
-    factory Cat([updates(CatBuilder b)]) = _$Cat;
+    factory Cat([void updates(CatBuilder b)]) = _$Cat;
     static Serializer<Cat> get serializer => _$catSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart
index 67961695b26..b839a19cf09 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/cat_all_of.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class CatAllOf implements Built<CatAllOf, CatAllOfBuilder> {
 
     static void _initializeBuilder(CatAllOfBuilder b) => b;
 
-    factory CatAllOf([updates(CatAllOfBuilder b)]) = _$CatAllOf;
+    factory CatAllOf([void updates(CatAllOfBuilder b)]) = _$CatAllOf;
     static Serializer<CatAllOf> get serializer => _$catAllOfSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart
index 0a46032028a..559aaea651a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/category.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -19,7 +26,7 @@ abstract class Category implements Built<Category, CategoryBuilder> {
     static void _initializeBuilder(CategoryBuilder b) => b
         ..name = 'default-name';
 
-    factory Category([updates(CategoryBuilder b)]) = _$Category;
+    factory Category([void updates(CategoryBuilder b)]) = _$Category;
     static Serializer<Category> get serializer => _$categorySerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart
index f46cf38c5c4..2c32de103b9 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/class_model.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class ClassModel implements Built<ClassModel, ClassModelBuilder> {
 
     static void _initializeBuilder(ClassModelBuilder b) => b;
 
-    factory ClassModel([updates(ClassModelBuilder b)]) = _$ClassModel;
+    factory ClassModel([void updates(ClassModelBuilder b)]) = _$ClassModel;
     static Serializer<ClassModel> get serializer => _$classModelSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart
index 0914e416ce3..443ce5d74a5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/animal.dart';
 import 'package:openapi/model/dog_all_of.dart';
 import 'package:built_value/built_value.dart';
@@ -25,7 +32,7 @@ abstract class Dog implements Built<Dog, DogBuilder> {
     static void _initializeBuilder(DogBuilder b) => b
         ..color = 'red';
 
-    factory Dog([updates(DogBuilder b)]) = _$Dog;
+    factory Dog([void updates(DogBuilder b)]) = _$Dog;
     static Serializer<Dog> get serializer => _$dogSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart
index 5805cdd29ce..7a0fba00849 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/dog_all_of.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class DogAllOf implements Built<DogAllOf, DogAllOfBuilder> {
 
     static void _initializeBuilder(DogAllOfBuilder b) => b;
 
-    factory DogAllOf([updates(DogAllOfBuilder b)]) = _$DogAllOf;
+    factory DogAllOf([void updates(DogAllOfBuilder b)]) = _$DogAllOf;
     static Serializer<DogAllOf> get serializer => _$dogAllOfSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart
index 6abf34bc4a2..7823f0163dc 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_arrays.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -21,7 +28,7 @@ abstract class EnumArrays implements Built<EnumArrays, EnumArraysBuilder> {
 
     static void _initializeBuilder(EnumArraysBuilder b) => b;
 
-    factory EnumArrays([updates(EnumArraysBuilder b)]) = _$EnumArrays;
+    factory EnumArrays([void updates(EnumArraysBuilder b)]) = _$EnumArrays;
     static Serializer<EnumArrays> get serializer => _$enumArraysSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart
index 4c48f04f8a5..e2fee623427 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/enum_test.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/outer_enum_integer_default_value.dart';
 import 'package:built_collection/built_collection.dart';
 import 'package:openapi/model/outer_enum_default_value.dart';
@@ -55,7 +62,7 @@ abstract class EnumTest implements Built<EnumTest, EnumTestBuilder> {
 
     static void _initializeBuilder(EnumTestBuilder b) => b;
 
-    factory EnumTest([updates(EnumTestBuilder b)]) = _$EnumTest;
+    factory EnumTest([void updates(EnumTestBuilder b)]) = _$EnumTest;
     static Serializer<EnumTest> get serializer => _$enumTestSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart
index fccb6c1708d..1bcfce7e9cf 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/file_schema_test_class.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/model_file.dart';
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
@@ -20,7 +27,7 @@ abstract class FileSchemaTestClass implements Built<FileSchemaTestClass, FileSch
 
     static void _initializeBuilder(FileSchemaTestClassBuilder b) => b;
 
-    factory FileSchemaTestClass([updates(FileSchemaTestClassBuilder b)]) = _$FileSchemaTestClass;
+    factory FileSchemaTestClass([void updates(FileSchemaTestClassBuilder b)]) = _$FileSchemaTestClass;
     static Serializer<FileSchemaTestClass> get serializer => _$fileSchemaTestClassSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart
index 3e2020ea2ef..9984cc16f58 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/foo.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -15,7 +22,7 @@ abstract class Foo implements Built<Foo, FooBuilder> {
     static void _initializeBuilder(FooBuilder b) => b
         ..bar = 'bar';
 
-    factory Foo([updates(FooBuilder b)]) = _$Foo;
+    factory Foo([void updates(FooBuilder b)]) = _$Foo;
     static Serializer<Foo> get serializer => _$fooSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart
index 9738eb3de68..8a2898740a5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/format_test.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'dart:typed_data';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -77,7 +84,7 @@ abstract class FormatTest implements Built<FormatTest, FormatTestBuilder> {
 
     static void _initializeBuilder(FormatTestBuilder b) => b;
 
-    factory FormatTest([updates(FormatTestBuilder b)]) = _$FormatTest;
+    factory FormatTest([void updates(FormatTestBuilder b)]) = _$FormatTest;
     static Serializer<FormatTest> get serializer => _$formatTestSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart
index 9489432fe52..9c5eb2686cb 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/has_only_read_only.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class HasOnlyReadOnly implements Built<HasOnlyReadOnly, HasOnlyReadOnly
 
     static void _initializeBuilder(HasOnlyReadOnlyBuilder b) => b;
 
-    factory HasOnlyReadOnly([updates(HasOnlyReadOnlyBuilder b)]) = _$HasOnlyReadOnly;
+    factory HasOnlyReadOnly([void updates(HasOnlyReadOnlyBuilder b)]) = _$HasOnlyReadOnly;
     static Serializer<HasOnlyReadOnly> get serializer => _$hasOnlyReadOnlySerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart
index dd6c1ccaff7..848806a19b5 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/health_check_result.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class HealthCheckResult implements Built<HealthCheckResult, HealthCheck
 
     static void _initializeBuilder(HealthCheckResultBuilder b) => b;
 
-    factory HealthCheckResult([updates(HealthCheckResultBuilder b)]) = _$HealthCheckResult;
+    factory HealthCheckResult([void updates(HealthCheckResultBuilder b)]) = _$HealthCheckResult;
     static Serializer<HealthCheckResult> get serializer => _$healthCheckResultSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object.dart
index b1477f60e8c..fb32b70cfa0 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object.dart
@@ -20,7 +20,7 @@ abstract class InlineObject implements Built<InlineObject, InlineObjectBuilder>
 
     static void _initializeBuilder(InlineObjectBuilder b) => b;
 
-    factory InlineObject([updates(InlineObjectBuilder b)]) = _$InlineObject;
+    factory InlineObject([void updates(InlineObjectBuilder b)]) = _$InlineObject;
     static Serializer<InlineObject> get serializer => _$inlineObjectSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object1.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object1.dart
index 2eadc367d2d..73064295609 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object1.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object1.dart
@@ -21,7 +21,7 @@ abstract class InlineObject1 implements Built<InlineObject1, InlineObject1Builde
 
     static void _initializeBuilder(InlineObject1Builder b) => b;
 
-    factory InlineObject1([updates(InlineObject1Builder b)]) = _$InlineObject1;
+    factory InlineObject1([void updates(InlineObject1Builder b)]) = _$InlineObject1;
     static Serializer<InlineObject1> get serializer => _$inlineObject1Serializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object2.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object2.dart
index 833fef79291..e402d332c29 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object2.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object2.dart
@@ -24,7 +24,7 @@ abstract class InlineObject2 implements Built<InlineObject2, InlineObject2Builde
     static void _initializeBuilder(InlineObject2Builder b) => b
         ..enumFormString = const InlineObject2EnumFormStringEnum._('-efg');
 
-    factory InlineObject2([updates(InlineObject2Builder b)]) = _$InlineObject2;
+    factory InlineObject2([void updates(InlineObject2Builder b)]) = _$InlineObject2;
     static Serializer<InlineObject2> get serializer => _$inlineObject2Serializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object3.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object3.dart
index 6afbdfa1625..a982efff248 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object3.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object3.dart
@@ -81,7 +81,7 @@ abstract class InlineObject3 implements Built<InlineObject3, InlineObject3Builde
 
     static void _initializeBuilder(InlineObject3Builder b) => b;
 
-    factory InlineObject3([updates(InlineObject3Builder b)]) = _$InlineObject3;
+    factory InlineObject3([void updates(InlineObject3Builder b)]) = _$InlineObject3;
     static Serializer<InlineObject3> get serializer => _$inlineObject3Serializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object4.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object4.dart
index 212de4d90dd..3a108a74879 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object4.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object4.dart
@@ -20,7 +20,7 @@ abstract class InlineObject4 implements Built<InlineObject4, InlineObject4Builde
 
     static void _initializeBuilder(InlineObject4Builder b) => b;
 
-    factory InlineObject4([updates(InlineObject4Builder b)]) = _$InlineObject4;
+    factory InlineObject4([void updates(InlineObject4Builder b)]) = _$InlineObject4;
     static Serializer<InlineObject4> get serializer => _$inlineObject4Serializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object5.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object5.dart
index b212a41cc6c..bfe53d5d417 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object5.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_object5.dart
@@ -21,7 +21,7 @@ abstract class InlineObject5 implements Built<InlineObject5, InlineObject5Builde
 
     static void _initializeBuilder(InlineObject5Builder b) => b;
 
-    factory InlineObject5([updates(InlineObject5Builder b)]) = _$InlineObject5;
+    factory InlineObject5([void updates(InlineObject5Builder b)]) = _$InlineObject5;
     static Serializer<InlineObject5> get serializer => _$inlineObject5Serializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart
index ba9c7ad34f6..b82e139b7c1 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/inline_response_default.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/foo.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -15,7 +22,7 @@ abstract class InlineResponseDefault implements Built<InlineResponseDefault, Inl
 
     static void _initializeBuilder(InlineResponseDefaultBuilder b) => b;
 
-    factory InlineResponseDefault([updates(InlineResponseDefaultBuilder b)]) = _$InlineResponseDefault;
+    factory InlineResponseDefault([void updates(InlineResponseDefaultBuilder b)]) = _$InlineResponseDefault;
     static Serializer<InlineResponseDefault> get serializer => _$inlineResponseDefaultSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart
index 39dca4c8bba..c8f311d81d6 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/map_test.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -28,7 +35,7 @@ abstract class MapTest implements Built<MapTest, MapTestBuilder> {
 
     static void _initializeBuilder(MapTestBuilder b) => b;
 
-    factory MapTest([updates(MapTestBuilder b)]) = _$MapTest;
+    factory MapTest([void updates(MapTestBuilder b)]) = _$MapTest;
     static Serializer<MapTest> get serializer => _$mapTestSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart
index 19b4b3aa521..31be421309c 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/animal.dart';
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
@@ -24,7 +31,7 @@ abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built<Mixe
 
     static void _initializeBuilder(MixedPropertiesAndAdditionalPropertiesClassBuilder b) => b;
 
-    factory MixedPropertiesAndAdditionalPropertiesClass([updates(MixedPropertiesAndAdditionalPropertiesClassBuilder b)]) = _$MixedPropertiesAndAdditionalPropertiesClass;
+    factory MixedPropertiesAndAdditionalPropertiesClass([void updates(MixedPropertiesAndAdditionalPropertiesClassBuilder b)]) = _$MixedPropertiesAndAdditionalPropertiesClass;
     static Serializer<MixedPropertiesAndAdditionalPropertiesClass> get serializer => _$mixedPropertiesAndAdditionalPropertiesClassSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart
index 1f8ea361b90..5dafab90e8a 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model200_response.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class Model200Response implements Built<Model200Response, Model200Respo
 
     static void _initializeBuilder(Model200ResponseBuilder b) => b;
 
-    factory Model200Response([updates(Model200ResponseBuilder b)]) = _$Model200Response;
+    factory Model200Response([void updates(Model200ResponseBuilder b)]) = _$Model200Response;
     static Serializer<Model200Response> get serializer => _$model200ResponseSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart
index 2ee3e1ced2c..5a99a70d9af 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_client.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class ModelClient implements Built<ModelClient, ModelClientBuilder> {
 
     static void _initializeBuilder(ModelClientBuilder b) => b;
 
-    factory ModelClient([updates(ModelClientBuilder b)]) = _$ModelClient;
+    factory ModelClient([void updates(ModelClientBuilder b)]) = _$ModelClient;
     static Serializer<ModelClient> get serializer => _$modelClientSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart
index 0877d459f7a..0a158ee5893 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_enum_class.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart
index bc1e736feca..07474a9cc61 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_file.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -15,7 +22,7 @@ abstract class ModelFile implements Built<ModelFile, ModelFileBuilder> {
 
     static void _initializeBuilder(ModelFileBuilder b) => b;
 
-    factory ModelFile([updates(ModelFileBuilder b)]) = _$ModelFile;
+    factory ModelFile([void updates(ModelFileBuilder b)]) = _$ModelFile;
     static Serializer<ModelFile> get serializer => _$modelFileSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart
index e95e59d4ec7..464a9e6baec 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_list.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class ModelList implements Built<ModelList, ModelListBuilder> {
 
     static void _initializeBuilder(ModelListBuilder b) => b;
 
-    factory ModelList([updates(ModelListBuilder b)]) = _$ModelList;
+    factory ModelList([void updates(ModelListBuilder b)]) = _$ModelList;
     static Serializer<ModelList> get serializer => _$modelListSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart
index 9d297a1538b..31259ba2086 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/model_return.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class ModelReturn implements Built<ModelReturn, ModelReturnBuilder> {
 
     static void _initializeBuilder(ModelReturnBuilder b) => b;
 
-    factory ModelReturn([updates(ModelReturnBuilder b)]) = _$ModelReturn;
+    factory ModelReturn([void updates(ModelReturnBuilder b)]) = _$ModelReturn;
     static Serializer<ModelReturn> get serializer => _$modelReturnSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart
index abd03a16c05..e84fe0359d9 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/name.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -26,7 +33,7 @@ abstract class Name implements Built<Name, NameBuilder> {
 
     static void _initializeBuilder(NameBuilder b) => b;
 
-    factory Name([updates(NameBuilder b)]) = _$Name;
+    factory Name([void updates(NameBuilder b)]) = _$Name;
     static Serializer<Name> get serializer => _$nameSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart
index 33e36a0aacf..8306d9546bb 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/nullable_class.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/json_object.dart';
 import 'package:built_value/built_value.dart';
@@ -60,7 +67,7 @@ abstract class NullableClass implements Built<NullableClass, NullableClassBuilde
 
     static void _initializeBuilder(NullableClassBuilder b) => b;
 
-    factory NullableClass([updates(NullableClassBuilder b)]) = _$NullableClass;
+    factory NullableClass([void updates(NullableClassBuilder b)]) = _$NullableClass;
     static Serializer<NullableClass> get serializer => _$nullableClassSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart
index 0f801275141..839165bb796 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/number_only.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class NumberOnly implements Built<NumberOnly, NumberOnlyBuilder> {
 
     static void _initializeBuilder(NumberOnlyBuilder b) => b;
 
-    factory NumberOnly([updates(NumberOnlyBuilder b)]) = _$NumberOnly;
+    factory NumberOnly([void updates(NumberOnlyBuilder b)]) = _$NumberOnly;
     static Serializer<NumberOnly> get serializer => _$numberOnlySerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart
index 517fba8eb73..f26c6213820 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/order.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
@@ -38,7 +45,7 @@ abstract class Order implements Built<Order, OrderBuilder> {
     static void _initializeBuilder(OrderBuilder b) => b
         ..complete = false;
 
-    factory Order([updates(OrderBuilder b)]) = _$Order;
+    factory Order([void updates(OrderBuilder b)]) = _$Order;
     static Serializer<Order> get serializer => _$orderSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart
index 3c2c45170aa..bc748ef970f 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_composite.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -22,7 +29,7 @@ abstract class OuterComposite implements Built<OuterComposite, OuterCompositeBui
 
     static void _initializeBuilder(OuterCompositeBuilder b) => b;
 
-    factory OuterComposite([updates(OuterCompositeBuilder b)]) = _$OuterComposite;
+    factory OuterComposite([void updates(OuterCompositeBuilder b)]) = _$OuterComposite;
     static Serializer<OuterComposite> get serializer => _$outerCompositeSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart
index 0409dc50666..ea68739f319 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart
index 1ba37949551..1751e9e4396 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_default_value.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart
index 83db130592b..8519a117116 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart
index 7eaeba5dfc2..cfc1b18f26b 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/outer_enum_integer_default_value.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_collection/built_collection.dart';
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart
index 1fb992db794..98757f5e7ce 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:openapi/model/tag.dart';
 import 'package:built_collection/built_collection.dart';
 import 'package:openapi/model/category.dart';
@@ -39,7 +46,7 @@ abstract class Pet implements Built<Pet, PetBuilder> {
 
     static void _initializeBuilder(PetBuilder b) => b;
 
-    factory Pet([updates(PetBuilder b)]) = _$Pet;
+    factory Pet([void updates(PetBuilder b)]) = _$Pet;
     static Serializer<Pet> get serializer => _$petSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart
index 898c30f40e1..6ac8f07169c 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/read_only_first.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class ReadOnlyFirst implements Built<ReadOnlyFirst, ReadOnlyFirstBuilde
 
     static void _initializeBuilder(ReadOnlyFirstBuilder b) => b;
 
-    factory ReadOnlyFirst([updates(ReadOnlyFirstBuilder b)]) = _$ReadOnlyFirst;
+    factory ReadOnlyFirst([void updates(ReadOnlyFirstBuilder b)]) = _$ReadOnlyFirst;
     static Serializer<ReadOnlyFirst> get serializer => _$readOnlyFirstSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart
index f80fcb16f66..dc072d5ddab 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/special_model_name.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -14,7 +21,7 @@ abstract class SpecialModelName implements Built<SpecialModelName, SpecialModelN
 
     static void _initializeBuilder(SpecialModelNameBuilder b) => b;
 
-    factory SpecialModelName([updates(SpecialModelNameBuilder b)]) = _$SpecialModelName;
+    factory SpecialModelName([void updates(SpecialModelNameBuilder b)]) = _$SpecialModelName;
     static Serializer<SpecialModelName> get serializer => _$specialModelNameSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart
index 8149a7d3498..528acd843e7 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/tag.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -18,7 +25,7 @@ abstract class Tag implements Built<Tag, TagBuilder> {
 
     static void _initializeBuilder(TagBuilder b) => b;
 
-    factory Tag([updates(TagBuilder b)]) = _$Tag;
+    factory Tag([void updates(TagBuilder b)]) = _$Tag;
     static Serializer<Tag> get serializer => _$tagSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart
index 3fd4092d546..93259a43019 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/user.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 import 'package:built_value/built_value.dart';
 import 'package:built_value/serializer.dart';
 
@@ -43,7 +50,7 @@ abstract class User implements Built<User, UserBuilder> {
 
     static void _initializeBuilder(UserBuilder b) => b;
 
-    factory User([updates(UserBuilder b)]) = _$User;
+    factory User([void updates(UserBuilder b)]) = _$User;
     static Serializer<User> get serializer => _$userSerializer;
 }
 
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart
index 833c5800619..6b0592d7f9e 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart
@@ -1,3 +1,10 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+// @dart=2.6
+
+// ignore_for_file: unused_import
+
 library serializers;
 
 import 'package:built_value/iso_8601_date_time_serializer.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml
index a37f8b9b5e3..6b98636b6a6 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pom.xml
@@ -67,6 +67,22 @@
                             </arguments>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>dartanalyzer</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>dartanalyzer</executable>
+                            <arguments>
+                                <argument>--fatal-infos</argument>
+                                <argument>--options</argument>
+                                <argument>analysis_options.yaml</argument>
+                                <argument>.</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
                     <execution>
                         <id>pub-test</id>
                         <phase>integration-test</phase>
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml
index 20b190aa1d3..c7c5c5aec83 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml
@@ -2,7 +2,7 @@ name: openapi
 version: 1.0.0
 description: OpenAPI API client
 environment:
-    sdk: ">=2.3.0 <3.0.0"
+    sdk: ">=2.6.0 <3.0.0"
 dependencies:
     dio: ^3.0.9
     built_value: ^7.1.0
-- 
GitLab


From 9ec1e23c1099662a08b67947470d4797767324ff Mon Sep 17 00:00:00 2001
From: Peter Leibiger <kuhnroyal@gmail.com>
Date: Tue, 5 Jan 2021 02:45:27 +0100
Subject: [PATCH 23/28] [dart][dart-dio] Fix collection and date default values
 not compiling (#8306)

* empty arrays are now correctly generated
* default arrays with values are empty
* date/dateTime is now always null in order to prevent compile errors
---
 .../codegen/languages/DartClientCodegen.java  |  7 ++-
 .../languages/DartDioClientCodegen.java       | 10 ++++
 .../codegen/dart/DartModelTest.java           | 26 ++++++++++
 .../codegen/dartdio/DartDioModelTest.java     | 52 +++++++++++++++++++
 4 files changed, 93 insertions(+), 2 deletions(-)

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java
index 5ebe5d5f5f0..f1f9016517d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java
@@ -472,13 +472,16 @@ public class DartClientCodegen extends DefaultCodegen {
         }
 
         if (schema.getDefault() != null) {
+            if (ModelUtils.isDateSchema(schema) || ModelUtils.isDateTimeSchema(schema)) {
+                // this is currently not supported and would create compile errors
+                return null;
+            }
             if (ModelUtils.isStringSchema(schema)) {
                 return "'" + schema.getDefault().toString().replace("'", "\\'") + "'";
             }
             return schema.getDefault().toString();
-        } else {
-            return null;
         }
+        return null;
     }
 
     @Override
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 ff934aa6161..68b66580e8a 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
@@ -126,6 +126,16 @@ public class DartDioClientCodegen extends DartClientCodegen {
     @Override
     public String toDefaultValue(Schema schema) {
         if (schema.getDefault() != null) {
+            if (ModelUtils.isArraySchema(schema)) {
+                return "ListBuilder()";
+            }
+            if (ModelUtils.isMapSchema(schema)) {
+                return "MapBuilder()";
+            }
+            if (ModelUtils.isDateSchema(schema) || ModelUtils.isDateTimeSchema(schema)) {
+                // this is currently not supported and would create compile errors
+                return null;
+            }
             if (ModelUtils.isStringSchema(schema)) {
                 return "'" + schema.getDefault().toString().replaceAll("'", "\\'") + "'";
             }
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java
index cab086ffaf1..c8438e80a0f 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java
@@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.Operation;
 import io.swagger.v3.oas.models.media.*;
 import org.openapitools.codegen.*;
 import org.openapitools.codegen.languages.DartClientCodegen;
+import org.openapitools.codegen.languages.DartDioClientCodegen;
 import org.testng.Assert;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -521,4 +522,29 @@ public class DartModelTest {
         Assert.assertEquals(op.returnType, "DateTime");
         Assert.assertEquals(op.bodyParam.dataType, "DateTime");
     }
+
+    @Test(description = "correctly generate date/datetime default values, currently null")
+    public void dateDefaultValues() {
+        final DateSchema date = new DateSchema();
+        date.setDefault("2021-01-01");
+        final DateTimeSchema dateTime = new DateTimeSchema();
+        dateTime.setDefault("2021-01-01T14:00:00Z");
+        final Schema model = new Schema()
+                .description("a sample model")
+                .addProperties("date", date)
+                .addProperties("dateTime", dateTime)
+                .addProperties("mapNoDefault", new MapSchema());
+        final DefaultCodegen codegen = new DartDioClientCodegen();
+        OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);
+        codegen.setOpenAPI(openAPI);
+        final CodegenModel cm = codegen.fromModel("sample", model);
+
+        final CodegenProperty dateDefault = cm.vars.get(0);
+        Assert.assertEquals(dateDefault.name, "date");
+        Assert.assertNull(dateDefault.defaultValue);
+
+        final CodegenProperty dateTimeDefault = cm.vars.get(1);
+        Assert.assertEquals(dateTimeDefault.name, "dateTime");
+        Assert.assertNull(dateTimeDefault.defaultValue);
+    }
 }
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java
index ade2bff57c0..3faa4d477a0 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java
@@ -391,4 +391,56 @@ public class DartDioModelTest {
         Assert.assertEquals(cm.name, name);
         Assert.assertEquals(cm.classname, expectedName);
     }
+
+    @Test(description = "correctly generate collection default values")
+    public void collectionDefaultValues() {
+        final ArraySchema array = new ArraySchema();
+        array.setDefault("[]");
+        final Schema model = new Schema()
+                .description("a sample model")
+                .addProperties("arrayNoDefault", new ArraySchema())
+                .addProperties("arrayEmptyDefault", array)
+                .addProperties("mapNoDefault", new MapSchema());
+        final DefaultCodegen codegen = new DartDioClientCodegen();
+        OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);
+        codegen.setOpenAPI(openAPI);
+        final CodegenModel cm = codegen.fromModel("sample", model);
+
+        final CodegenProperty arrayNoDefault = cm.vars.get(0);
+        Assert.assertEquals(arrayNoDefault.name, "arrayNoDefault");
+        Assert.assertNull(arrayNoDefault.defaultValue);
+
+        final CodegenProperty arrayEmptyDefault = cm.vars.get(1);
+        Assert.assertEquals(arrayEmptyDefault.name, "arrayEmptyDefault");
+        Assert.assertEquals(arrayEmptyDefault.defaultValue, "ListBuilder()");
+
+        final CodegenProperty mapNoDefault = cm.vars.get(2);
+        Assert.assertEquals(mapNoDefault.name, "mapNoDefault");
+        Assert.assertNull(mapNoDefault.defaultValue);
+    }
+
+    @Test(description = "correctly generate date/datetime default values, currently null")
+    public void dateDefaultValues() {
+        final DateSchema date = new DateSchema();
+        date.setDefault("2021-01-01");
+        final DateTimeSchema dateTime = new DateTimeSchema();
+        dateTime.setDefault("2021-01-01T14:00:00Z");
+        final Schema model = new Schema()
+                .description("a sample model")
+                .addProperties("date", date)
+                .addProperties("dateTime", dateTime)
+                .addProperties("mapNoDefault", new MapSchema());
+        final DefaultCodegen codegen = new DartDioClientCodegen();
+        OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);
+        codegen.setOpenAPI(openAPI);
+        final CodegenModel cm = codegen.fromModel("sample", model);
+
+        final CodegenProperty dateDefault = cm.vars.get(0);
+        Assert.assertEquals(dateDefault.name, "date");
+        Assert.assertNull(dateDefault.defaultValue);
+
+        final CodegenProperty dateTimeDefault = cm.vars.get(1);
+        Assert.assertEquals(dateTimeDefault.name, "dateTime");
+        Assert.assertNull(dateTimeDefault.defaultValue);
+    }
 }
-- 
GitLab


From 3506ad6f1788abd9fb1d404583e545ac5d7a0461 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Tue, 5 Jan 2021 10:46:28 +0800
Subject: [PATCH 24/28] Ignore docker login error for PR (#8327)

* ignre docker login error

* trigger faiure

* Revert "trigger faiure"

This reverts commit ce17593d2835e1c940e11dbe6df8f88d7c82e5c1.
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 8277146e3a0..afe97dc2720 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -76,7 +76,7 @@ before_install:
   # set python 3.6.3 as default
   - source ~/virtualenv/python3.6/bin/activate
   # to run petstore server locally via docker
-  - echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
+  - echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin || true
   - docker pull swaggerapi/petstore
   - docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
   - docker ps -a
-- 
GitLab


From 872f9399cd86e1450f04831c1788056ed2a3c473 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Tue, 5 Jan 2021 14:35:31 +0800
Subject: [PATCH 25/28] comment out dart dio tests due to CircleCI failure

---
 pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ff2d86119fa..df059d27319 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1352,9 +1352,10 @@
                 <module>samples/client/petstore/dart2/petstore</module>
                 <module>samples/openapi3/client/petstore/dart2/petstore_client_lib</module>
                 <module>samples/openapi3/client/petstore/dart2/petstore</module>
+                <!-- comment out due to CircleCI failure
                 <module>samples/client/petstore/dart-dio/petstore_client_lib</module>
                 <module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib</module>
-                <module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake</module>
+                <module>samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake</module> -->
                 <module>samples/client/petstore/dart-jaguar/openapi</module>
                 <module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
             </modules>
-- 
GitLab


From 72869d53a3eb2c80f639e9c7ea47282720780425 Mon Sep 17 00:00:00 2001
From: NickPak <13172485+NickPak@users.noreply.github.com>
Date: Tue, 5 Jan 2021 14:39:56 +0800
Subject: [PATCH 26/28] [C][Client] Add C++ reserved keywords to C-libcurl
 client generator, then the C client can be compiled by C++ compiler (#8205)

* [C][Client] Add cpp reserved keywords to C-libcurl client generator

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
---
 docs/generators/c.md                          |  68 +++++++++++
 .../languages/CLibcurlClientCodegen.java      | 106 +++++++++++++++++-
 2 files changed, 173 insertions(+), 1 deletion(-)

diff --git a/docs/generators/c.md b/docs/generators/c.md
index 29df6b2096e..448cf98b4bf 100644
--- a/docs/generators/c.md
+++ b/docs/generators/c.md
@@ -56,41 +56,109 @@ These options may be applied as additional-properties (cli) or configOptions (pl
 <li>_noreturn</li>
 <li>_static_assert</li>
 <li>_thread_local</li>
+<li>alignas</li>
+<li>alignof</li>
+<li>and</li>
+<li>and_eq</li>
+<li>asm</li>
+<li>atomic_cancel</li>
+<li>atomic_commit</li>
+<li>atomic_noexcept</li>
 <li>auto</li>
+<li>bitand</li>
+<li>bitor</li>
+<li>bool</li>
 <li>break</li>
 <li>case</li>
+<li>catch</li>
 <li>char</li>
+<li>char16_t</li>
+<li>char32_t</li>
+<li>char8_t</li>
+<li>class</li>
+<li>co_await</li>
+<li>co_return</li>
+<li>co_yield</li>
+<li>compl</li>
+<li>concept</li>
 <li>const</li>
+<li>const_cast</li>
+<li>consteval</li>
+<li>constexpr</li>
+<li>constinit</li>
 <li>continue</li>
+<li>decltype</li>
 <li>default</li>
+<li>delete</li>
 <li>do</li>
 <li>double</li>
+<li>dynamic_cast</li>
 <li>else</li>
 <li>enum</li>
+<li>explicit</li>
+<li>export</li>
 <li>extern</li>
+<li>false</li>
+<li>final</li>
 <li>float</li>
 <li>for</li>
+<li>friend</li>
 <li>goto</li>
 <li>if</li>
 <li>inline</li>
 <li>int</li>
 <li>long</li>
+<li>mutable</li>
+<li>namespace</li>
+<li>new</li>
+<li>noexcept</li>
+<li>not</li>
+<li>not_eq</li>
+<li>nullptr</li>
+<li>operator</li>
+<li>or</li>
+<li>or_eq</li>
+<li>override</li>
+<li>private</li>
+<li>protected</li>
+<li>public</li>
+<li>reflexpr</li>
 <li>register</li>
+<li>reinterpret_cast</li>
 <li>remove</li>
+<li>requires</li>
 <li>restrict</li>
 <li>return</li>
 <li>short</li>
 <li>signed</li>
 <li>sizeof</li>
 <li>static</li>
+<li>static_assert</li>
+<li>static_cast</li>
 <li>struct</li>
 <li>switch</li>
+<li>synchronized</li>
+<li>template</li>
+<li>this</li>
+<li>thread_local</li>
+<li>throw</li>
+<li>transaction_safe</li>
+<li>transaction_safe_dynamic</li>
+<li>true</li>
+<li>try</li>
 <li>typedef</li>
+<li>typeid</li>
+<li>typename</li>
 <li>union</li>
 <li>unsigned</li>
+<li>using</li>
+<li>virtual</li>
 <li>void</li>
 <li>volatile</li>
+<li>wchar_t</li>
 <li>while</li>
+<li>xor</li>
+<li>xor_eq</li>
 </ul>
 
 ## FEATURE SET
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
index f64d2d99d3f..dbc59ae281c 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
@@ -143,7 +143,111 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
                         "_Imaginary",
                         "_Noreturn",
                         "_Static_assert",
-                        "_Thread_local")
+                        "_Thread_local",
+
+                        // cpp reserved keywords
+                        // ref: https://en.cppreference.com/w/cpp/keyword
+                        "alignas",
+                        "alignof",
+                        "and",
+                        "and_eq",
+                        "asm",
+                        "atomic_cancel",
+                        "atomic_commit",
+                        "atomic_noexcept",
+                        //"auto",
+                        "bitand",
+                        "bitor",
+                        "bool",
+                        //"break",
+                        //"case",
+                        "catch",
+                        //"char",
+                        "char8_t",
+                        "char16_t",
+                        "char32_t",
+                        "class",
+                        "compl",
+                        "concept",
+                        //"const",
+                        "consteval",
+                        "constexpr",
+                        "constinit",
+                        "const_cast",
+                        //"continue",
+                        "co_await",
+                        "co_return",
+                        "co_yield",
+                        "decltype",
+                        //"default",
+                        "delete",
+                        //"do",
+                        //"double",
+                        "dynamic_cast",
+                        //"else",
+                        //"enum",
+                        "explicit",
+                        "export",
+                        //"extern",
+                        "false",
+                        //"float",
+                        //"for",
+                        "friend",
+                        //"goto",
+                        //"if",
+                        //"inline",
+                        //"int",
+                        //"long",
+                        "mutable",
+                        "namespace",
+                        "new",
+                        "noexcept",
+                        "not",
+                        "not_eq",
+                        "nullptr",
+                        "operator",
+                        "or",
+                        "or_eq",
+                        "private",
+                        "protected",
+                        "public",
+                        "reflexpr",
+                        //"register",
+                        "reinterpret_cast",
+                        "requires",
+                        //"return",
+                        //"short",
+                        //"signed",
+                        //"sizeof",
+                        //"static",
+                        "static_assert",
+                        "static_cast",
+                        //"struct",
+                        //"switch",
+                        "synchronized",
+                        "template",
+                        "this",
+                        "thread_local",
+                        "throw",
+                        "true",
+                        "try",
+                        //"typedef",
+                        "typeid",
+                        "typename",
+                        //"union",
+                        //"unsigned",
+                        "using",
+                        "virtual",
+                        //"void",
+                        //"volatile",
+                        "wchar_t",
+                        //"while",
+                        "xor",
+                        "xor_eq",
+                        "final",
+                        "override",
+                        "transaction_safe",
+                        "transaction_safe_dynamic")
         );
 
         instantiationTypes.clear();
-- 
GitLab


From c3a21863b5e07f1f941ccdbbe72adced83b379a8 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Tue, 5 Jan 2021 14:58:24 +0800
Subject: [PATCH 27/28] fix bugs with duplicated decoder (#8223)

---
 .../openapi-generator/src/main/resources/elm/operation.mustache | 2 +-
 .../src/main/resources/elm/recordFieldValueDecoder.mustache     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/elm/operation.mustache b/modules/openapi-generator/src/main/resources/elm/operation.mustache
index 0f4035a8188..de4d54d1798 100644
--- a/modules/openapi-generator/src/main/resources/elm/operation.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/operation.mustache
@@ -33,7 +33,7 @@ import Uuid exposing (Uuid){{/includeUuid}}
 {-| {{{notes}}}
 -}
 {{/notes}}
-{{operationId}} : {{#allParams}}{{^required}}Maybe {{/required}}{{#isArray}}List {{/isArray}}{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{#isModel}}Api.Data.{{/isModel}}{{dataType}}{{/datatypeWithEnum}} -> {{/allParams}}{{#authMethods}}{{#isBasicBearer}}String -> {{/isBasicBearer}}{{/authMethods}}Api.Request {{^responses}}(){{/responses}}{{#responses}}{{#is2xx}}{{^dataType}}(){{/dataType}}{{#isMap}}(Dict.Dict String {{/isMap}}{{#isArray}}(List {{/isArray}}{{^primitiveType}}{{^isUuid}}Api.Data.{{/isUuid}}{{/primitiveType}}{{#items}}{{#isModel}}Api.Data.{{/isModel}}{{/items}}{{dataType}}{{#isArray}}){{/isArray}}{{#isMap}}){{/isMap}}{{/is2xx}}{{/responses}}
+{{operationId}} : {{#allParams}}{{^required}}Maybe {{/required}}{{#isArray}}List {{/isArray}}{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{#isModel}}Api.Data.{{/isModel}}{{dataType}}{{/datatypeWithEnum}} -> {{/allParams}}{{#authMethods}}{{#isBasicBearer}}String -> {{/isBasicBearer}}{{/authMethods}}Api.Request {{^responses}}(){{/responses}}{{#responses}}{{#is2xx}}{{^dataType}}(){{/dataType}}{{#isMap}}(Dict.Dict String {{/isMap}}{{#isArray}}(List {{#items}}{{#isModel}}Api.Data.{{/isModel}}{{/items}}{{/isArray}}{{^isArray}}{{^primitiveType}}{{^isUuid}}Api.Data.{{/isUuid}}{{/primitiveType}}{{/isArray}}{{dataType}}{{#isArray}}){{/isArray}}{{#isMap}}){{/isMap}}{{/is2xx}}{{/responses}}
 {{operationId}}{{#allParams}} {{>paramName}}{{/allParams}}{{#authMethods}}{{#isBasicBearer}} auth_token{{/isBasicBearer}}{{/authMethods}} =
     Api.request
         "{{httpMethod}}"
diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache
index d182a19974e..d01b75352d4 100644
--- a/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache
@@ -1 +1 @@
-{{#isArray}}(Json.Decode.list {{/isArray}}{{#isMap}}(Json.Decode.dict {{/isMap}}{{#items}}{{>recordFieldValueDecoder}}{{/items}}{{^isContainer}}{{#isCircularReference}}(Json.Decode.lazy (\_ -> {{/isCircularReference}}{{>fieldDecoder}}{{#isCircularReference}})){{/isCircularReference}}{{/isContainer}}{{#isArray}}){{/isArray}}{{#isMap}}){{/isMap}}
\ No newline at end of file
+{{#isArray}}(Json.Decode.list {{/isArray}}{{#isMap}}(Json.Decode.dict {{/isMap}}{{#items}}{{>recordFieldValueDecoder}}{{/items}}{{^isArray}}{{#isCircularReference}}(Json.Decode.lazy (\_ -> {{/isCircularReference}}{{>fieldDecoder}}{{#isCircularReference}})){{/isCircularReference}}{{/isArray}}{{#isArray}}){{/isArray}}{{#isMap}}){{/isMap}}
\ No newline at end of file
-- 
GitLab


From 80be92678bc892c6d1b91a33e7659fbf3d458cf8 Mon Sep 17 00:00:00 2001
From: Marius Dege <marius.dege@basyskom.com>
Date: Tue, 5 Jan 2021 13:15:18 +0100
Subject: [PATCH 28/28] renamed Qt5 to Qt

---
 .github/.test/samples.json                         |  4 ++--
 .github/auto-labeler.yml                           |  4 ++--
 .gitignore                                         | 14 +++++++-------
 .../{cpp-qt5-client.yaml => cpp-qt-client.yaml}    |  6 +++---
 ...ient-cpp-qt5.yaml => cpp-qt-client-cpp-qt.yaml} |  6 +++---
 docs/migration-from-swagger-codegen.md             |  2 +-
 ...5ClientCodegen.java => CppQtClientCodegen.java} | 12 ++++++------
 .../org.openapitools.codegen.CodegenConfig         |  2 +-
 .../CMakeLists.txt.mustache                        |  0
 .../HttpFileElement.cpp.mustache                   |  0
 .../HttpFileElement.h.mustache                     |  0
 .../HttpRequest.cpp.mustache                       |  2 +-
 .../HttpRequest.h.mustache                         |  0
 .../Project.mustache                               |  0
 .../README.mustache                                |  4 ++--
 .../ServerConfiguration.mustache                   |  0
 .../ServerVariable.mustache                        |  0
 .../api-body.mustache                              |  0
 .../api-header.mustache                            |  0
 .../enum.mustache                                  |  0
 .../helpers-body.mustache                          |  0
 .../helpers-header.mustache                        |  0
 .../licenseInfo.mustache                           |  0
 .../model-body.mustache                            |  0
 .../model-header.mustache                          |  0
 .../object.mustache                                |  0
 pom.xml                                            |  2 +-
 .../petstore/{cpp-qt5 => cpp-qt}/.clang-format     |  0
 .../client/petstore/{cpp-qt5 => cpp-qt}/.gitignore |  0
 .../{cpp-qt5 => cpp-qt}/.openapi-generator-ignore  |  0
 .../{cpp-qt5 => cpp-qt}/.openapi-generator/FILES   |  1 +
 .../{cpp-qt5 => cpp-qt}/.openapi-generator/VERSION |  0
 .../petstore/{cpp-qt5 => cpp-qt}/CMakeLists.txt    |  2 +-
 .../{cpp-qt5 => cpp-qt}/PetStore/PetApiTests.cpp   |  0
 .../{cpp-qt5 => cpp-qt}/PetStore/PetApiTests.h     |  0
 .../{cpp-qt5 => cpp-qt}/PetStore/PetStore.pro      |  0
 .../{cpp-qt5 => cpp-qt}/PetStore/StoreApiTests.cpp |  0
 .../{cpp-qt5 => cpp-qt}/PetStore/StoreApiTests.h   |  0
 .../{cpp-qt5 => cpp-qt}/PetStore/UserApiTests.cpp  |  0
 .../{cpp-qt5 => cpp-qt}/PetStore/UserApiTests.h    |  0
 .../petstore/{cpp-qt5 => cpp-qt}/PetStore/main.cpp |  0
 .../client/petstore/{cpp-qt5 => cpp-qt}/README.md  |  4 ++--
 .../{cpp-qt5 => cpp-qt}/build-and-test.bash        |  6 +++---
 .../{cpp-qt5 => cpp-qt}/client/CMakeLists.txt      |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXApiResponse.cpp  |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXApiResponse.h    |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXCategory.cpp     |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXCategory.h       |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXEnum.h  |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXHelpers.cpp      |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXHelpers.h        |  0
 .../client/PFXHttpFileElement.cpp                  |  0
 .../client/PFXHttpFileElement.h                    |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXHttpRequest.cpp  |  2 +-
 .../{cpp-qt5 => cpp-qt}/client/PFXHttpRequest.h    |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXObject.h         |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXOrder.cpp        |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXOrder.h |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXPet.cpp |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXPet.h   |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXPetApi.cpp       |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXPetApi.h         |  0
 .../client/PFXServerConfiguration.h                |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXServerVariable.h |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXStoreApi.cpp     |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXStoreApi.h       |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXTag.cpp |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXTag.h   |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXUser.cpp         |  0
 .../petstore/{cpp-qt5 => cpp-qt}/client/PFXUser.h  |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXUserApi.cpp      |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXUserApi.h        |  0
 .../{cpp-qt5 => cpp-qt}/client/PFXclient.pri       |  0
 .../client/petstore/{cpp-qt5 => cpp-qt}/pom.xml    |  2 +-
 website/i18n/en.json                               |  6 +++---
 75 files changed, 41 insertions(+), 40 deletions(-)
 rename bin/configs/{cpp-qt5-client.yaml => cpp-qt-client.yaml} (72%)
 rename bin/configs/other/openapi3/{cpp-qt5-client-cpp-qt5.yaml => cpp-qt-client-cpp-qt.yaml} (62%)
 rename modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/{CppQt5ClientCodegen.java => CppQtClientCodegen.java} (96%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/CMakeLists.txt.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/HttpFileElement.cpp.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/HttpFileElement.h.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/HttpRequest.cpp.mustache (99%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/HttpRequest.h.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/Project.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/README.mustache (98%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/ServerConfiguration.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/ServerVariable.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/api-body.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/api-header.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/enum.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/helpers-body.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/helpers-header.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/licenseInfo.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/model-body.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/model-header.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{cpp-qt5-client => cpp-qt-client}/object.mustache (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/.clang-format (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/.gitignore (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/.openapi-generator-ignore (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/.openapi-generator/FILES (96%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/.openapi-generator/VERSION (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/CMakeLists.txt (97%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/PetApiTests.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/PetApiTests.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/PetStore.pro (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/StoreApiTests.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/StoreApiTests.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/UserApiTests.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/UserApiTests.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/PetStore/main.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/README.md (98%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/build-and-test.bash (88%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/CMakeLists.txt (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXApiResponse.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXApiResponse.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXCategory.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXCategory.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXEnum.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXHelpers.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXHelpers.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXHttpFileElement.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXHttpFileElement.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXHttpRequest.cpp (99%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXHttpRequest.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXObject.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXOrder.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXOrder.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXPet.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXPet.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXPetApi.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXPetApi.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXServerConfiguration.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXServerVariable.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXStoreApi.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXStoreApi.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXTag.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXTag.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXUser.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXUser.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXUserApi.cpp (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXUserApi.h (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/client/PFXclient.pri (100%)
 rename samples/client/petstore/{cpp-qt5 => cpp-qt}/pom.xml (96%)

diff --git a/.github/.test/samples.json b/.github/.test/samples.json
index 1f753ac8fc3..71bfc55b86e 100644
--- a/.github/.test/samples.json
+++ b/.github/.test/samples.json
@@ -61,7 +61,7 @@
       ]
     },
     {
-      "input": "cpp-qt5-petstore.sh",
+      "input": "cpp-qt-petstore.sh",
       "matches": [
         "Client: C++",
         "Client: QT"
@@ -1377,4 +1377,4 @@
       "matches": []
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml
index 5bff51d5cec..8d1159a8866 100644
--- a/.github/auto-labeler.yml
+++ b/.github/auto-labeler.yml
@@ -112,8 +112,8 @@ labels:
       - '\s*?\[python\]\s*?'
       - '\s*?-[gl] python(?!-)\b'
     'Client: QT':
-      - '\s*?\[cpp-qt5-client\]\s*?'
-      - '\s*?-[gl] cpp-qt5-client\s*?'
+      - '\s*?\[cpp-qt-client\]\s*?'
+      - '\s*?-[gl] cpp-qt-client\s*?'
     'Client: R':
       - '\s*?\[[rR]\]\s*?'
       - '\s*?-[gl] r(?!-)\b'
diff --git a/.gitignore b/.gitignore
index 26c01a81696..6b3ae43cf77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,14 +61,14 @@ samples/server-generator/node/output/node_modules
 samples/server/petstore/nodejs/node_modules
 samples/server/petstore/nodejs-server/node_modules
 
-# qt5 cpp
+# qt cpp
 *.pro.user
-samples/client/petstore/qt5cpp/PetStore/moc_*
-samples/client/petstore/qt5cpp/PetStore/*.o
-samples/client/petstore/qt5cpp/build-*
-samples/client/petstore/qt5cpp/PetStore/PetStore
-samples/client/petstore/qt5cpp/PetStore/Makefile
-samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user
+samples/client/petstore/qtcpp/PetStore/moc_*
+samples/client/petstore/qtcpp/PetStore/*.o
+samples/client/petstore/qtcpp/build-*
+samples/client/petstore/qtcpp/PetStore/PetStore
+samples/client/petstore/qtcpp/PetStore/Makefile
+samples/client/petstore/qtcpp/PetStore/PetStore.pro.user
 
 # cpprestsdk
 samples/client/petstore/cpp-restsdk/CMakeCache.txt
diff --git a/bin/configs/cpp-qt5-client.yaml b/bin/configs/cpp-qt-client.yaml
similarity index 72%
rename from bin/configs/cpp-qt5-client.yaml
rename to bin/configs/cpp-qt-client.yaml
index dc36141b436..14f4a274500 100644
--- a/bin/configs/cpp-qt5-client.yaml
+++ b/bin/configs/cpp-qt-client.yaml
@@ -1,7 +1,7 @@
-generatorName: cpp-qt5-client
-outputDir: samples/client/petstore/cpp-qt5
+generatorName: cpp-qt-client
+outputDir: samples/client/petstore/cpp-qt
 inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-client
+templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client
 additionalProperties:
   cppNamespace: test_namespace
   modelNamePrefix: PFX
diff --git a/bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml b/bin/configs/other/openapi3/cpp-qt-client-cpp-qt.yaml
similarity index 62%
rename from bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml
rename to bin/configs/other/openapi3/cpp-qt-client-cpp-qt.yaml
index 904d99a7510..8e9d8cf5bb8 100644
--- a/bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml
+++ b/bin/configs/other/openapi3/cpp-qt-client-cpp-qt.yaml
@@ -1,4 +1,4 @@
-generatorName: cpp-qt5-client
-outputDir: samples/client/petstore/cpp-qt5
+generatorName: cpp-qt-client
+outputDir: samples/client/petstore/cpp-qt
 inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-client
+templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client
diff --git a/docs/migration-from-swagger-codegen.md b/docs/migration-from-swagger-codegen.md
index db6069bec79..1d446b50836 100644
--- a/docs/migration-from-swagger-codegen.md
+++ b/docs/migration-from-swagger-codegen.md
@@ -122,7 +122,7 @@ All languages of `swagger-codegen` have been migrated to `openapi-generator`, bu
 | `akka-scala` | `scala-akka` |
 | `scala` | `scala-httpclient` |
 | `jaxrs` | `jaxrs-jersey` |
-| `qt5cpp` | `cpp-qt5` |
+| `qt5cpp` | `cpp-qt` |
 | `cpprest` | `cpp-restsdk` |
 | `tizen` | `cpp-tizen` |
 | `sinatra` | `ruby-sinatra` |
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java
similarity index 96%
rename from modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java
rename to modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java
index f0b8cfc957c..0b25f75ab89 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java
@@ -28,13 +28,13 @@ import java.io.File;
 
 import static org.openapitools.codegen.utils.StringUtils.*;
 
-public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements CodegenConfig {
+public class CppQtClientCodegen extends CppQt5AbstractCodegen implements CodegenConfig {
     public static final String OPTIONAL_PROJECT_FILE_DESC = "Generate client.pri.";
     // source folder where to write the files
     protected String sourceFolder = "client";
     protected boolean optionalProjectFileFlag = true;
 
-    public CppQt5ClientCodegen() {
+    public CppQtClientCodegen() {
         super();
 
 
@@ -45,7 +45,7 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege
         );
 
         // set the output folder here
-        outputFolder = "generated-code/qt5cpp";
+        outputFolder = "generated-code/qtcpp";
 
         /*
          * Models.  You can write model files using the modelTemplateFiles map.
@@ -78,7 +78,7 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege
          * Template Location.  This is the location which templates will be read from.  The generator
          * will use the resource stream to attempt to read the templates.
          */
-        embeddedTemplateDir = templateDir = "cpp-qt5-client";
+        embeddedTemplateDir = templateDir = "cpp-qt-client";
 
         addSwitch(CodegenConstants.OPTIONAL_PROJECT_FILE, OPTIONAL_PROJECT_FILE_DESC, this.optionalProjectFileFlag);
         supportingFiles.add(new SupportingFile("helpers-header.mustache", sourceFolder, PREFIX + "Helpers.h"));
@@ -153,7 +153,7 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege
      */
     @Override
     public String getName() {
-        return "cpp-qt5-client";
+        return "cpp-qt-client";
     }
 
     /**
@@ -164,7 +164,7 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege
      */
     @Override
     public String getHelp() {
-        return "Generates a Qt5 C++ client library.";
+        return "Generates a Qt C++ client library.";
     }
 
     /**
diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
index 8fe400f1148..2a72674bbc9 100644
--- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
+++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
@@ -10,7 +10,7 @@ org.openapitools.codegen.languages.BashClientCodegen
 org.openapitools.codegen.languages.CLibcurlClientCodegen
 org.openapitools.codegen.languages.ClojureClientCodegen
 org.openapitools.codegen.languages.ConfluenceWikiCodegen
-org.openapitools.codegen.languages.CppQt5ClientCodegen
+org.openapitools.codegen.languages.CppQtClientCodegen
 org.openapitools.codegen.languages.CppQt5QHttpEngineServerCodegen
 org.openapitools.codegen.languages.CppPistacheServerCodegen
 org.openapitools.codegen.languages.CppRestbedServerCodegen
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/CMakeLists.txt.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/CMakeLists.txt.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpFileElement.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpFileElement.cpp.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpFileElement.cpp.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/HttpFileElement.cpp.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpFileElement.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpFileElement.h.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpFileElement.h.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/HttpFileElement.h.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache
similarity index 99%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache
index 57692b69d8a..d8c2b586a7d 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache
@@ -312,7 +312,7 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) {
     if ({{prefix}}HttpRequestWorker::sslDefaultConfiguration != nullptr) {
         request.setSslConfiguration(*{{prefix}}HttpRequestWorker::sslDefaultConfiguration);
     }
-    request.setRawHeader("User-Agent", "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{apiVersion}}/cpp-qt5{{/httpUserAgent}}");
+    request.setRawHeader("User-Agent", "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{apiVersion}}/cpp-qt{{/httpUserAgent}}");
     foreach (QString key, input->headers.keys()) { request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str()); }
 
     if (request_content.size() > 0 && !isFormData && (input->var_layout != MULTIPART)) {
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.h.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.h.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/Project.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/Project.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/Project.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/Project.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/README.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache
similarity index 98%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/README.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache
index 5f319457532..9692bf79152 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/README.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache
@@ -53,10 +53,10 @@ At first generate the JAR by executing:
 mvn clean package
 ```
 
-Use the Jar file to generate the Qt5 Client:
+Use the Jar file to generate the Qt Client:
 
 ```shell
-java -jar target/openapi-generator-cli.jar generate -i <yourOpenApiFile> -g cpp-qt5-client -o <outputDir>
+java -jar target/openapi-generator-cli.jar generate -i <yourOpenApiFile> -g cpp-qt-client -o <outputDir>
 ```
 
 ## Getting Started
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/ServerConfiguration.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/ServerConfiguration.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/ServerConfiguration.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/ServerConfiguration.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/ServerVariable.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/ServerVariable.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/ServerVariable.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/ServerVariable.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/enum.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/enum.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/helpers-body.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/helpers-body.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/helpers-header.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-header.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/helpers-header.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/licenseInfo.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/licenseInfo.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/licenseInfo.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/model-body.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/model-body.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/model-header.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/model-header.mustache
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/object.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache
rename to modules/openapi-generator/src/main/resources/cpp-qt-client/object.mustache
diff --git a/pom.xml b/pom.xml
index df059d27319..6c6e6a25b8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1195,7 +1195,7 @@
                 <module>samples/client/petstore/ruby-faraday</module>
                 <module>samples/client/petstore/ruby</module>
                 <module>samples/client/petstore/c</module>
-                <module>samples/client/petstore/cpp-qt5</module>
+                <module>samples/client/petstore/cpp-qt</module>
                 <module>samples/client/petstore/rust</module>
                 <module>samples/client/petstore/rust/reqwest/petstore</module>
                 <module>samples/client/petstore/rust/reqwest/petstore-async</module>
diff --git a/samples/client/petstore/cpp-qt5/.clang-format b/samples/client/petstore/cpp-qt/.clang-format
similarity index 100%
rename from samples/client/petstore/cpp-qt5/.clang-format
rename to samples/client/petstore/cpp-qt/.clang-format
diff --git a/samples/client/petstore/cpp-qt5/.gitignore b/samples/client/petstore/cpp-qt/.gitignore
similarity index 100%
rename from samples/client/petstore/cpp-qt5/.gitignore
rename to samples/client/petstore/cpp-qt/.gitignore
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator-ignore b/samples/client/petstore/cpp-qt/.openapi-generator-ignore
similarity index 100%
rename from samples/client/petstore/cpp-qt5/.openapi-generator-ignore
rename to samples/client/petstore/cpp-qt/.openapi-generator-ignore
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/FILES b/samples/client/petstore/cpp-qt/.openapi-generator/FILES
similarity index 96%
rename from samples/client/petstore/cpp-qt5/.openapi-generator/FILES
rename to samples/client/petstore/cpp-qt/.openapi-generator/FILES
index 3b14ec399c5..79abba723da 100644
--- a/samples/client/petstore/cpp-qt5/.openapi-generator/FILES
+++ b/samples/client/petstore/cpp-qt/.openapi-generator/FILES
@@ -1,3 +1,4 @@
+.openapi-generator-ignore
 README.md
 client/CMakeLists.txt
 client/PFXApiResponse.cpp
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION
similarity index 100%
rename from samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
rename to samples/client/petstore/cpp-qt/.openapi-generator/VERSION
diff --git a/samples/client/petstore/cpp-qt5/CMakeLists.txt b/samples/client/petstore/cpp-qt/CMakeLists.txt
similarity index 97%
rename from samples/client/petstore/cpp-qt5/CMakeLists.txt
rename to samples/client/petstore/cpp-qt/CMakeLists.txt
index 517669ae806..f5389fd195f 100644
--- a/samples/client/petstore/cpp-qt5/CMakeLists.txt
+++ b/samples/client/petstore/cpp-qt/CMakeLists.txt
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.2)
 
-project(cpp-qt5-petstore)
+project(cpp-qt-petstore)
 set(CMAKE_VERBOSE_MAKEFILE ON)
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_AUTOMOC ON)
diff --git a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.cpp b/samples/client/petstore/cpp-qt/PetStore/PetApiTests.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/PetApiTests.cpp
rename to samples/client/petstore/cpp-qt/PetStore/PetApiTests.cpp
diff --git a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h b/samples/client/petstore/cpp-qt/PetStore/PetApiTests.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h
rename to samples/client/petstore/cpp-qt/PetStore/PetApiTests.h
diff --git a/samples/client/petstore/cpp-qt5/PetStore/PetStore.pro b/samples/client/petstore/cpp-qt/PetStore/PetStore.pro
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/PetStore.pro
rename to samples/client/petstore/cpp-qt/PetStore/PetStore.pro
diff --git a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp b/samples/client/petstore/cpp-qt/PetStore/StoreApiTests.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp
rename to samples/client/petstore/cpp-qt/PetStore/StoreApiTests.cpp
diff --git a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h b/samples/client/petstore/cpp-qt/PetStore/StoreApiTests.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h
rename to samples/client/petstore/cpp-qt/PetStore/StoreApiTests.h
diff --git a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp b/samples/client/petstore/cpp-qt/PetStore/UserApiTests.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp
rename to samples/client/petstore/cpp-qt/PetStore/UserApiTests.cpp
diff --git a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h b/samples/client/petstore/cpp-qt/PetStore/UserApiTests.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h
rename to samples/client/petstore/cpp-qt/PetStore/UserApiTests.h
diff --git a/samples/client/petstore/cpp-qt5/PetStore/main.cpp b/samples/client/petstore/cpp-qt/PetStore/main.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/PetStore/main.cpp
rename to samples/client/petstore/cpp-qt/PetStore/main.cpp
diff --git a/samples/client/petstore/cpp-qt5/README.md b/samples/client/petstore/cpp-qt/README.md
similarity index 98%
rename from samples/client/petstore/cpp-qt5/README.md
rename to samples/client/petstore/cpp-qt/README.md
index f72d21e557d..156bb656f1d 100644
--- a/samples/client/petstore/cpp-qt5/README.md
+++ b/samples/client/petstore/cpp-qt/README.md
@@ -46,10 +46,10 @@ At first generate the JAR by executing:
 mvn clean package
 ```
 
-Use the Jar file to generate the Qt5 Client:
+Use the Jar file to generate the Qt Client:
 
 ```shell
-java -jar target/openapi-generator-cli.jar generate -i <yourOpenApiFile> -g cpp-qt5-client -o <outputDir>
+java -jar target/openapi-generator-cli.jar generate -i <yourOpenApiFile> -g cpp-qt-client -o <outputDir>
 ```
 
 ## Getting Started
diff --git a/samples/client/petstore/cpp-qt5/build-and-test.bash b/samples/client/petstore/cpp-qt/build-and-test.bash
similarity index 88%
rename from samples/client/petstore/cpp-qt5/build-and-test.bash
rename to samples/client/petstore/cpp-qt/build-and-test.bash
index bcf96489533..6901b5e3fe6 100755
--- a/samples/client/petstore/cpp-qt5/build-and-test.bash
+++ b/samples/client/petstore/cpp-qt/build-and-test.bash
@@ -11,10 +11,10 @@ cmake ..
 make
 
 if [[ -z "${RUN_VALGRIND_TESTS}" ]]; then
-    echo "Running Qt5 Petstore Tests"
-    ./cpp-qt5-petstore
+    echo "Running Qt Petstore Tests"
+    ./cpp-qt-petstore
 else
-  echo "Running Qt5 Petstore Tests with Valgrind"
+  echo "Running Qt Petstore Tests with Valgrind"
   valgrind --leak-check=full ./cpp-qt5-petstore |& tee result.log || exit 1
   testCount=$(cat result.log | grep 'Finished testing of' | wc -l)
   if [ $testCount == 3 ]
diff --git a/samples/client/petstore/cpp-qt5/client/CMakeLists.txt b/samples/client/petstore/cpp-qt/client/CMakeLists.txt
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/CMakeLists.txt
rename to samples/client/petstore/cpp-qt/client/CMakeLists.txt
diff --git a/samples/client/petstore/cpp-qt5/client/PFXApiResponse.cpp b/samples/client/petstore/cpp-qt/client/PFXApiResponse.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXApiResponse.cpp
rename to samples/client/petstore/cpp-qt/client/PFXApiResponse.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXApiResponse.h b/samples/client/petstore/cpp-qt/client/PFXApiResponse.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXApiResponse.h
rename to samples/client/petstore/cpp-qt/client/PFXApiResponse.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXCategory.cpp b/samples/client/petstore/cpp-qt/client/PFXCategory.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXCategory.cpp
rename to samples/client/petstore/cpp-qt/client/PFXCategory.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXCategory.h b/samples/client/petstore/cpp-qt/client/PFXCategory.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXCategory.h
rename to samples/client/petstore/cpp-qt/client/PFXCategory.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXEnum.h b/samples/client/petstore/cpp-qt/client/PFXEnum.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXEnum.h
rename to samples/client/petstore/cpp-qt/client/PFXEnum.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXHelpers.cpp b/samples/client/petstore/cpp-qt/client/PFXHelpers.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXHelpers.cpp
rename to samples/client/petstore/cpp-qt/client/PFXHelpers.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXHelpers.h b/samples/client/petstore/cpp-qt/client/PFXHelpers.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXHelpers.h
rename to samples/client/petstore/cpp-qt/client/PFXHelpers.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXHttpFileElement.cpp b/samples/client/petstore/cpp-qt/client/PFXHttpFileElement.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXHttpFileElement.cpp
rename to samples/client/petstore/cpp-qt/client/PFXHttpFileElement.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXHttpFileElement.h b/samples/client/petstore/cpp-qt/client/PFXHttpFileElement.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXHttpFileElement.h
rename to samples/client/petstore/cpp-qt/client/PFXHttpFileElement.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXHttpRequest.cpp b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp
similarity index 99%
rename from samples/client/petstore/cpp-qt5/client/PFXHttpRequest.cpp
rename to samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp
index e92c99f4f02..7bc4ed04643 100644
--- a/samples/client/petstore/cpp-qt5/client/PFXHttpRequest.cpp
+++ b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp
@@ -319,7 +319,7 @@ void PFXHttpRequestWorker::execute(PFXHttpRequestInput *input) {
     if (PFXHttpRequestWorker::sslDefaultConfiguration != nullptr) {
         request.setSslConfiguration(*PFXHttpRequestWorker::sslDefaultConfiguration);
     }
-    request.setRawHeader("User-Agent", "OpenAPI-Generator/1.0.0/cpp-qt5");
+    request.setRawHeader("User-Agent", "OpenAPI-Generator/1.0.0/cpp-qt");
     foreach (QString key, input->headers.keys()) { request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str()); }
 
     if (request_content.size() > 0 && !isFormData && (input->var_layout != MULTIPART)) {
diff --git a/samples/client/petstore/cpp-qt5/client/PFXHttpRequest.h b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXHttpRequest.h
rename to samples/client/petstore/cpp-qt/client/PFXHttpRequest.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXObject.h b/samples/client/petstore/cpp-qt/client/PFXObject.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXObject.h
rename to samples/client/petstore/cpp-qt/client/PFXObject.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXOrder.cpp b/samples/client/petstore/cpp-qt/client/PFXOrder.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXOrder.cpp
rename to samples/client/petstore/cpp-qt/client/PFXOrder.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXOrder.h b/samples/client/petstore/cpp-qt/client/PFXOrder.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXOrder.h
rename to samples/client/petstore/cpp-qt/client/PFXOrder.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXPet.cpp b/samples/client/petstore/cpp-qt/client/PFXPet.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXPet.cpp
rename to samples/client/petstore/cpp-qt/client/PFXPet.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXPet.h b/samples/client/petstore/cpp-qt/client/PFXPet.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXPet.h
rename to samples/client/petstore/cpp-qt/client/PFXPet.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXPetApi.cpp b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXPetApi.cpp
rename to samples/client/petstore/cpp-qt/client/PFXPetApi.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXPetApi.h b/samples/client/petstore/cpp-qt/client/PFXPetApi.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXPetApi.h
rename to samples/client/petstore/cpp-qt/client/PFXPetApi.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXServerConfiguration.h b/samples/client/petstore/cpp-qt/client/PFXServerConfiguration.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXServerConfiguration.h
rename to samples/client/petstore/cpp-qt/client/PFXServerConfiguration.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXServerVariable.h b/samples/client/petstore/cpp-qt/client/PFXServerVariable.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXServerVariable.h
rename to samples/client/petstore/cpp-qt/client/PFXServerVariable.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXStoreApi.cpp b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXStoreApi.cpp
rename to samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXStoreApi.h b/samples/client/petstore/cpp-qt/client/PFXStoreApi.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXStoreApi.h
rename to samples/client/petstore/cpp-qt/client/PFXStoreApi.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXTag.cpp b/samples/client/petstore/cpp-qt/client/PFXTag.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXTag.cpp
rename to samples/client/petstore/cpp-qt/client/PFXTag.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXTag.h b/samples/client/petstore/cpp-qt/client/PFXTag.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXTag.h
rename to samples/client/petstore/cpp-qt/client/PFXTag.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXUser.cpp b/samples/client/petstore/cpp-qt/client/PFXUser.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXUser.cpp
rename to samples/client/petstore/cpp-qt/client/PFXUser.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXUser.h b/samples/client/petstore/cpp-qt/client/PFXUser.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXUser.h
rename to samples/client/petstore/cpp-qt/client/PFXUser.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXUserApi.cpp b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXUserApi.cpp
rename to samples/client/petstore/cpp-qt/client/PFXUserApi.cpp
diff --git a/samples/client/petstore/cpp-qt5/client/PFXUserApi.h b/samples/client/petstore/cpp-qt/client/PFXUserApi.h
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXUserApi.h
rename to samples/client/petstore/cpp-qt/client/PFXUserApi.h
diff --git a/samples/client/petstore/cpp-qt5/client/PFXclient.pri b/samples/client/petstore/cpp-qt/client/PFXclient.pri
similarity index 100%
rename from samples/client/petstore/cpp-qt5/client/PFXclient.pri
rename to samples/client/petstore/cpp-qt/client/PFXclient.pri
diff --git a/samples/client/petstore/cpp-qt5/pom.xml b/samples/client/petstore/cpp-qt/pom.xml
similarity index 96%
rename from samples/client/petstore/cpp-qt5/pom.xml
rename to samples/client/petstore/cpp-qt/pom.xml
index 70cf260fde7..d58b7a720a9 100644
--- a/samples/client/petstore/cpp-qt5/pom.xml
+++ b/samples/client/petstore/cpp-qt/pom.xml
@@ -1,7 +1,7 @@
 <project>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.openapitools</groupId>
-    <artifactId>CppQt5PetstoreClientTests</artifactId>
+    <artifactId>CppQtPetstoreClientTests</artifactId>
     <packaging>pom</packaging>
     <version>1.0-SNAPSHOT</version>
     <name>Qt5 OpenAPI Petstore Client</name>
diff --git a/website/i18n/en.json b/website/i18n/en.json
index 251a4c177af..4cf2176a24b 100644
--- a/website/i18n/en.json
+++ b/website/i18n/en.json
@@ -91,9 +91,9 @@
         "title": "Config Options for cpp-pistache-server",
         "sidebar_label": "cpp-pistache-server"
       },
-      "generators/cpp-qt5-client": {
-        "title": "Config Options for cpp-qt5-client",
-        "sidebar_label": "cpp-qt5-client"
+      "generators/cpp-qt-client": {
+        "title": "Config Options for cpp-qt-client",
+        "sidebar_label": "cpp-qt-client"
       },
       "generators/cpp-qt5-qhttpengine-server": {
         "title": "Config Options for cpp-qt5-qhttpengine-server",
-- 
GitLab